Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / October 2005

Tip: Looking for answers? Try searching our database.

C'tor of WebUserControl

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Oren - 16 Oct 2005 15:30 GMT
Hello everyone...

I have a simple WebUserControl with Button and TextBox on it. Webform1.aspx
contains this WebUserControl.
How can I create my own C'tor for this WebUserControl - I mean when I run
Webform1.aspx I want to send data to the UserControl (fill Textbox1.Text).

any samples ?

thanx,
Oren
Karl Seguin - 16 Oct 2005 16:11 GMT
Oren:
Check out http://openmymind.net/index.aspx?documentId=9

you can't use anything like a constructor because controls aren't
instantiated like normal classes.  If you want to set values, you create
properties in the user control and read them in Page_Load of the user
control.

Karl

Signature

-->
MY ASP.Net tutorials
http://www.openmymind.net/
http://openmymind.net/redirector.aspx?documentId=51 - Learn about AJAX!

> Hello everyone...
>
[quoted text clipped - 8 lines]
> thanx,
> Oren
Oren - 17 Oct 2005 08:16 GMT
Karl,

How can I call to a Function/Property and send data dynamically to the
UserControl ? I mean Instead (look at CurrentPage):
<Result:Header id="rh" CurrentPage="1" RecordsPerPage="2" runat="server" />
To do:
<Result:Header id="rh" CurrentPage="GetText()" RecordsPerPage="2"
runat="server" />

GetText() -> on the Webform...

(code was taken from your link below...)
http://openmymind.net/index.aspx?documentId=9

thanx,
Oren

> Oren:
> Check out http://openmymind.net/index.aspx?documentId=9
[quoted text clipped - 18 lines]
> > thanx,
> > Oren

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.