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



what is usercontrol how we can use acess the controls that are present in the usercontrol in the as..

Answer / 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

More ASP.NET Interview Questions

What are the server control tags in asp.net.?

0 Answers   MCN Solutions,


what is state management,what is the purpose of it,how it will be implemented in real time?

2 Answers  


Explain how server control validation controls works?

2 Answers   CMS, Syntax Softtech,


What is a server farm in iis?

0 Answers  


Explain about consistent programming model in the .NET framework?

0 Answers  






Write code to send e-mail from an asp.net application?

0 Answers  


What is the server of asp.net?

0 Answers  


Disable Session State at the Page Level

1 Answers  


How ASP.NET page works?

0 Answers   MCN Solutions,


What is Virtual path in ASP.Net

2 Answers   Proteans,


What events will occur when a page is loaded?

0 Answers  


What are the validation controls ?

1 Answers  


Categories