Page Navigation with Server.Transfer and ViewState

D

Dan

I have a datagrid in ASP.NET 1.1

When selecting a particular row, it should divert to another aspx page
and allow me to edit details about that selected row.

What do people feel is the best practise for page navigation?

I'm of the opinion that query string usage via hyperlinks isn't as
secure as post methods via forms, as people could easily amend the url
in their browser address bar?

I'm currently trying to do the following:-

viewState("selectedRowId") = DataGrid1.DataKeys(e.Item.ItemIndex)
Server.Transfer("secondPage.aspx", True)

Then on my secondPage.aspx,

response.write("selectedRowId = " & Request.Form("selectedRowId"))

This doesn't work. I am currently using hidden form values on my first
page and some client-side script to set the hidden value based on my
selected row, then submitting the form, but this is just a bit long
winded and time consuming. I don't want to use Session variables
either, as i'd need to maintain them and clear them.

Surely there must be a better way to do this? What do people generally
use for quick secure page navigation?

Any suggestions are most welcome

Thanks in advance

Dan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,070
Latest member
BiogenixGummies

Latest Threads

Top