Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > declaration of web user control

Reply
Thread Tools

declaration of web user control

 
 
vikram
Guest
Posts: n/a
 
      04-04-2005
I have made a web user control (.ascx). Now i want when
user drags it on any aspx page , its declaration in the
code behind should come automatically like this :
Private Withevents <UserControl1> as new <UserControl>.
How can i achive this ?

thanks
 
Reply With Quote
 
 
 
 
MattC
Guest
Posts: n/a
 
      04-04-2005
Unfortuntely you cant do this with usercontrols. You have to manually
declar teh control in your code behind then (in OnInit) use FindControl to
get teh actual page instance of the control and assign it to the code behind
variable for access.
"vikram" <> wrote in message
news:01b301c538d5$943555c0$...
>I have made a web user control (.ascx). Now i want when
> user drags it on any aspx page , its declaration in the
> code behind should come automatically like this :
> Private Withevents <UserControl1> as new <UserControl>.
> How can i achive this ?
>
> thanks



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
persisting changes to a control outside a user control from the user control? Mad Scientist Jr ASP .Net 0 03-22-2006 08:02 AM
Web User Control with GridView can derive new Web User Control? ABC ASP .Net 1 10-04-2005 12:29 PM
Web User Control with GridView can derive new Web User Control? ABC ASP .Net Web Controls 0 10-03-2005 10:23 AM
Web User Control with GridView can derive new Web User Control? ABC ASP .Net 0 10-03-2005 10:23 AM
accessing the web user control's control from a web page and set a value from another web page Reny J Joseph Thuthikattu ASP .Net 1 12-30-2004 12:21 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57