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 different ways you would consider sending data across pages in ASP (i.e between asp to asp)?

0 Answers  


Explain the difference between authentication and authorization.

0 Answers  


Explain the use of view state?

0 Answers  


How to reduce the width of textbox in editcommandcolumn of datagrid?

0 Answers  


Can you explain the basic use of dataview?

0 Answers  






what is the difference between this.controls and page.form1.controls and me.controls?

2 Answers   FactorH,


What is Hybrid dictionary

1 Answers  


how we can solve machine key error in asp.net?

3 Answers  


Different type of validation controls in asp.net ?

1 Answers   CTS, Keane India Ltd,


Explain the procedure to handle the process request using mhpm events fired? : asp.net mvc

0 Answers  


Which of the following hosts Can't be used to create .net Application? a) IIS b) Internet Explorer c) ASP.Net d) Windows Shell Which one is correct?

1 Answers   CTS, TCS,


Diff between web user control and web custom control?

0 Answers  


Categories