First you should be add runat="server" attribute for control and also provide a Id to that control.
Now you can access that control in aspx.cs page using id
Exa:
I want to convert a textbox to html server control
<input type="text" value="find" />
for this i will add a runat,id attribute to textbox runat ="server" ,id="textId"
<input type="text" runat ="server" id="textId" value="find" />
now you can use this cotrol at aspx.cs page using this id="textid"
Now you can access that control in aspx.cs page using id
Exa:
I want to convert a textbox to html server control
<input type="text" value="find" />
for this i will add a runat,id attribute to textbox runat ="server" ,id="textId"
<input type="text" runat ="server" id="textId" value="find" />
now you can use this cotrol at aspx.cs page using this id="textid"


0 comments:
Post a Comment
Note: only a member of this blog may post a comment.