Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PostbackUrl and Masterpages problem 1

Status
Not open for further replies.

AndyH1

Programmer
Jan 11, 2004
350
GB
I want a user to fill in a form and post using potsbackurl as in


however the site and the pages I am developing my pages on uses a masterpage (which I am not allowed to modify). Because of the Masterpage I cannot get the values from the previous page using the method described in the article, and wonder if anyone can advise a way of doing this without altering the masterpage (or if possible using the Findcontrol or server.transfer which I gather is inherently fragile)

Thanks
Andy
 
If you convert the object to the specific page (or interface if you define one) and expose the public properties required there should not be any issues.

Another option is to use the Context.Request.Params container and pull the raw values from there.
Code:
string value;
foreach(string key in Context.Request.Params.Keys)
{
   if(!key.EndsWith([name of control])) continue;
   value = Context.Request.Params[key];
   break;
}
//do something with value

Jason Meckley
Programmer
Specialty Bakers, Inc.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top