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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Changing the DefaultMode of a FormView

Status
Not open for further replies.

Gill1978

Programmer
Joined
Jun 12, 2001
Messages
277
Location
GB
Hi,

I'm trying to change the DefaultMode of a page (e.g Page2.aspx) from Edit to Insert when a user selects a button in another page (e.g. Page1.aspx).

In the rest of the application Page2.aspx should always run in Edit mode except for the above occassion.

Can anyone point me in the direction of how to accomplish this??

Thanks in advance

Julie
 
You could pass a variable through as a querystring to the page


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
sorry ... not sure what you mean?

Thanks

Julie
 
Well, if you redirect the user from page one to page two, pass a querystring value along in the URL. Then, on page two, check if this value exists. If it does, change the FormView mode into Insert.


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
Thanks for that ...
You don't by any chance have a link to an FAQ/ other post ... i'm new to C# ... and i'm assuming the checking for the querystring value is in the code behind page?

Thanks

Julie
 
Have a look at the help files for Request.Querystring


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
Hi

Not to be a pain but how do I retrieve the parameter passed?

I've got the following in page1
PostBackUrl='~/Page2.aspx?id="Add"'

How do I retrieve the parameter in page2 ...

I had a look around but I can't seem to find what i'm looking for??!

Thanks in advance ...

Julie
 
would it be request.querystring("id")

Thanks

Julie
 
would it be request.querystring("id")
Why not try it and find out?


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
Hiya,

Changed tack ... so now I'm trying to add the Profile parameter to the postbackUrl so it returns to another page.

Typical of me can't seem to find a source on how to attach this to the postBackUrl ... any helpful hints??

Thank for the patience ..

Julie
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top