what is usercontrol how we can use acess the controls that
are present in the usercontrol in the aspx page
suppose we have 2 text boxes in a user control how u can
acess the 2 textboxs in the aspx page
Answer Posted / om shivaya namaha
user control purpose is when ever a group of controls that
used in most of the pages then we can define those controls
as a user control
user.ascx page :-2 textboxes it is containing
textbox1
textbox2
default.aspx:- thes aspx page is going to use the user control
in design default.aspx:-
<@register tagname="User" tageprefix="US" src="user.ascx">
<table>
<tr>
<td><US:User id="Usercont" runat="server" ></td>
</tr></table>
in serverside default page:-
textbox tx=new textbox();
tx= (textbox)Usercont.findcontrol("textbox1");
| Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
How does asp.net work?
What is the equivalent of date() and time() in asp.net?
What is difference between session and cookies?
What kind of data can be stored in viewstate?
How do we assign page-specific attributes?
How to make paging concepts in datagrid in ASP.NET?
Explain the concept of View Model in MVC?
How does a content page different from a master page?
How many types of sessions in asp.net?
How is mvc different from asp.net? : Asp.Net MVC
is there any third party tools are using in .net technologies? what are there ? give me the brief introduction?
What does clearing cache?
Can the validation occurs in server-side or client-side? If the validation occurs why should we do?
What are the steps to follow to host a web application on a web server?
Is viewstate secure?