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 / June 2007

Tip: Looking for answers? Try searching our database.

Request.Querystring and User Control in .Net 2.0

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Paul - 15 Jun 2007 18:22 GMT
This may be a stupid question but...

How do I programmtically access the page's request.querystring value in a
custom user control.

I tried doing this in the page_load routine of the user control but I do not
seem to be able to access the value?

TIA.
Steve C. Orr [MCSD, MVP, CSM, ASP Insider] - 15 Jun 2007 18:53 GMT
Did you try Page.Request.QueryString?

Signature

I hope this helps,
Steve C. Orr,
MCSD, MVP, CSM, ASPInsider
http://SteveOrr.net

> This may be a stupid question but...
>
[quoted text clipped - 6 lines]
>
> TIA.
Paul - 15 Jun 2007 19:17 GMT
Yes, I fixed the issue. It had to do with how I coded the page_load
subroutine.

A bigger question:

I declare a variable in the main page. I want to pass that variable to the
user control. How do I do this? Is there an example somewhere?

Thanks for you assistance.

"Steve C. Orr [MCSD, MVP, CSM, ASP Inside" wrote:

> Did you try Page.Request.QueryString?
>
[quoted text clipped - 8 lines]
> >
> > TIA.
Steve C. Orr [MCSD, MVP, CSM, ASP Insider] - 15 Jun 2007 20:32 GMT
Your control should expose a public property that can be set by the page.
I've documented this in more detail here:
http://SteveOrr.net/faq/PassDataToUserControl.aspx
http://SteveOrr.net/faq/PassDataBetweenControls.aspx

Signature

I hope this helps,
Steve C. Orr,
MCSD, MVP, CSM, ASPInsider
http://SteveOrr.net

> Yes, I fixed the issue. It had to do with how I coded the page_load
> subroutine.
[quoted text clipped - 22 lines]
>> >
>> > TIA.
Paul - 15 Jun 2007 21:54 GMT
Your first example uses a method. I think I will need a property. Is there an
example for that?

Thank you very much.

- Paul

"Steve C. Orr [MCSD, MVP, CSM, ASP Inside" wrote:

> Your control should expose a public property that can be set by the page.
> I've documented this in more detail here:
[quoted text clipped - 27 lines]
> >> >
> >> > TIA.

Rate this thread:







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.