Postback to a different page?

  • Thread starter Thread starter Gee
  • Start date Start date
G

Gee

Hi,


I'm new to C#.NET but quite knowledgeable in ASP.


I usually write my websites to pass the page to view in the URL string.

This way, I have one page that does all the work and depending on what

page the user selects to view, the header/menus and footer remains the
same and only the content of the page changes.


I would like to use the datagrid controls features including the
postback which will allow users to enter data direclty into the
datagrid by switching it into edit mode on the selected line.


The problem I have is that when the page does the postback, it posts
back directly to the content page and therefore I lose all my menus and

footers for the page. Is there a way I can force the post-back to
redirect to another page (in this case the main one handling all the
requests)?


Thanks for any help!


-Gee.
 
Gee,

I'm not sure, but can't you specify in the form element for the page
(through the action attribute) where you want to post the page back to?

Hope this helps.
 
Hi Nicholas,

I've tried setting the action= attribute on the form, but I think the
postback is done from the datagrid (so it's not submitting the form at
all), it happens when I click the 'EDIT' link on the datagrid to put
the grid into edit mode.

I basically get the datagrid on a blank page without my menus or style
sheets etc. as it posts-back to the physical page the datagrid is on.

Any more help would be appreciated.

Thanks,

-Gee.
 
Back
Top