First, pass it as a property of the user control.
<uc:UserControl MyProperty="Blah" />
Next, if not using code behind, then just declare:
public DataType MyProperty;
If using code behind, use a getter/setter:
private DataType _MyProperty;
public DataType MyProperty
{
get
{
return _MyProperty;
}
set
{
_MyProperty = value;
}
}
/Ryan
On 10/11/05, jomargon <[EMAIL PROTECTED]> wrote:
>
> Hi. I made a web application (aspx) that uses AJAX. But later on, I
> was told to convert it to user control (ascx). I just want to know the
> best method to pass value from the host page to the user control upon
> user control's load.
>
> Thanks,
>
> JM
>
>
>
>
>
> SPONSORED LINKS
> Basic programming
> language<http://groups.yahoo.com/gads?t=ms&k=Basic+programming+language&w1=Basic+programming+language&w2=Computer+programming+languages&w3=Programming+languages&w4=Java+programming+language&c=4&s=126&.sig=bnac3LCZpttb3c9FvbVU-A>
> Computer
> programming
> languages<http://groups.yahoo.com/gads?t=ms&k=Computer+programming+languages&w1=Basic+programming+language&w2=Computer+programming+languages&w3=Programming+languages&w4=Java+programming+language&c=4&s=126&.sig=1Czd2hKCO9_u4KVZQperFQ>
> Programming
> languages<http://groups.yahoo.com/gads?t=ms&k=Programming+languages&w1=Basic+programming+language&w2=Computer+programming+languages&w3=Programming+languages&w4=Java+programming+language&c=4&s=126&.sig=TyHGCjod4YOKITrSq1xccQ>
> Java
> programming
> language<http://groups.yahoo.com/gads?t=ms&k=Java+programming+language&w1=Basic+programming+language&w2=Computer+programming+languages&w3=Programming+languages&w4=Java+programming+language&c=4&s=126&.sig=PZAexF9LyXpKb3HDJSlB1g>
> ------------------------------
> YAHOO! GROUPS LINKS
>
>
> - Visit your group
> "AspNetAnyQuestionIsOk<http://groups.yahoo.com/group/AspNetAnyQuestionIsOk>"
> on the web.
> - To unsubscribe from this group, send an email to:
> [EMAIL PROTECTED]<[EMAIL PROTECTED]>
> - Your use of Yahoo! Groups is subject to the Yahoo! Terms of
> Service <http://docs.yahoo.com/info/terms/>.
>
>
> ------------------------------
>
--
Thank you,
Ryan Olshan
<asp:Web Programmer, Owner />
TeraNet Systems
http://www.teranetsystems.com
--------Internet E-Mail Confidentiality Statement--------
The content of and attachment(s) to this electronic transmission contains
information from TeraNet Systems and is intended for the use of the person,
firm or entity to which it is directed herein, and may contain information
that is private, confidential, exempt from disclosure under applicable law,
and/or proprietary to TeraNet Systems and is protected by law. If you are
not the intended recipient, or the employee or agent responsible for
delivering this message to the intended recipient, any dissemination,
distribution or copying of this communication is strictly prohibited. If you
have received this message in error, please notify the sender,
[EMAIL PROTECTED], immediately by reply e-mail and delete the original
message and any attachment(s) without reading or saving in any matter. Thank
you for your cooperation.
[Non-text portions of this message have been removed]
------------------------ Yahoo! Groups Sponsor --------------------~-->
Most low income households are not online. Help bridge the digital divide today!
http://us.click.yahoo.com/cd_AJB/QnQLAA/TtwFAA/saFolB/TM
--------------------------------------------------------------------~->
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/