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

Should validation (did the user enter a real date) occur server-side or client-side? Why?

4 Answers   Siebel Systems,


What is a viewbag?

0 Answers  


Which property is used to identify the Page is Post Back in ASP.NET?

0 Answers   Sans Pareil IT Services,


What is Razor View Engine

0 Answers   HCL,


What are runtime hosts?

2 Answers   Microsoft,






Explain what are webservices?

0 Answers  


how to get modified rows from Dataset

1 Answers   CGI,


How to check null values in dataset ?

6 Answers   Digital GlobalSoft,


Difference between dynamic query and static query ?

1 Answers   DELL,


what is clr .

1 Answers   Patni,


What are client activated objects and server activated objects?

0 Answers  


What is view state and how this can be done and was this there in asp ?

3 Answers   Accenture, BirlaSoft, CTS, Mphasis,


Categories