Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Basics
Password Reminder
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old March 7th, 2005, 04:34 PM
Friend of Wrox
Join Date: Jun 2003
Location: Harrisburg, PA, USA.
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default Posting data from Control to Page


I'm trying to post data from a user control to a page. I can access the data sure enough, but the problem I am now having is the fields are blank. I can't retrieve any of the fields defined in the user control in the posted to page. To give you a scenario, I have two pages search.aspx and view.aspx, which both post to searchresults.aspx. view.aspx has a user control that posts the user control data to searchresults.aspx page using PostBackUrl.

So it posts back to the page fine, but IsCrossPagePosted is false and there isn't any fields in the control.

Any ideas? Thanks,

Reply With Quote
  #2 (permalink)  
Old December 6th, 2005, 08:08 PM
Registered User
Join Date: Dec 2005
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts

Whenever you have controls within a User Control, you should remember to traverse the control hierarchy properly to access the controls. You may have to do something like this:

((TextBox)Page.PreviousPage.FindControl("MyUserCon trol").FindControl("EmbeddedTextBoxControl)).Text

Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Posting a page from AJAX Tab Control dhurjati_sen C# 2 August 20th, 2007 11:05 PM
Posting to Another Page & reading data posted geo54321 C# 1 February 19th, 2007 12:22 PM
Posting String Array From one page to another page Samatha ASP.NET 1.0 and 1.1 Professional 1 December 6th, 2006 03:54 AM
More Qstn on posting"Create Control on the fly" lxu Access 0 April 14th, 2004 09:10 AM
posting/requesting data from web server page one5 .NET Web Services 2 July 28th, 2003 03:14 PM

All times are GMT -4. The time now is 03:11 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.