Twitter iPhone pliant OnePlus 11 PS5 Disney+ Orange Livebox Windows 11

Datagrid, redirect and Form.

1 réponse
Avatar
Lionel
Hi,

I have a datagrid in page1.aspx
I would like, when the user clicks on the Edit button
(<asp:EditCommandColumn for ex.), to redirect him to the page2.aspx with the
value of the first column passed as a parameter (equivalent of POST method
in ASP, Request.Form in page2.aspx...).
I know the datagrid as to be located in a FORM with runat=SERVER ; so,
anything i write in the *action=* (page2.aspx.....) in the FORM is ignored.

How can i do this in ASP.Net. It was simple in ASP= ? I must be wrong in my
way of thinking.

Thanks.

1 réponse

Avatar
Sebastien Bovo [MS]
Hello,

ASP.NET does not allow to post the form on another Webform. You should
examine working with a unique page and then use on server side :

Response.redirect -
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemwebhttpresponseclassredirecttopic.asp
Server.Transfer -
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemWebHttpServerUtilityClassTransferTopic1.asp

--
Cordialement,

Sebastien Bovo
Microsoft France
----------
Ce message est fourni en l'état, sans garantie d'aucune sorte, et ne vous
confère aucun droit. Vous assumez tous les risques liés à son utilisation.


"Lionel" wrote in message
news:
Hi,

I have a datagrid in page1.aspx
I would like, when the user clicks on the Edit button
(<asp:EditCommandColumn for ex.), to redirect him to the page2.aspx with
the
value of the first column passed as a parameter (equivalent of POST method
in ASP, Request.Form in page2.aspx...).
I know the datagrid as to be located in a FORM with runat=SERVER ; so,
anything i write in the *action=* (page2.aspx.....) in the FORM is
ignored.

How can i do this in ASP.Net. It was simple in ASP= ? I must be wrong in
my
way of thinking.

Thanks.