I have three ASPX Pages. The ASPX Page which get called from the two other Page is a Page where i can Upload files.
I call that Upload-Page from the other two Pages with JavaScript:
function UploadFax_Click() {
var grid = ISGetObject("WebGrid1");
var curSelObj = grid.GetSelectedObject(); // get selected object
var row = curSelObj.GetRowObject(); // get the WebGridRow object
if (row.Type == "Record") {
var s_id = row.KeyValue
}
window.location = '../Admin/UploadFax.aspx?suppid=' + s_id;
}
Then on the Upload-Page i get the QueryString:
If Not IsPostBack And Len(Request.QueryString("suppid")) > 0 Then
If Not Request.QueryString("suppid") Is Nothing Then
Session("suppid") = Request.QueryString("suppid")
End If
End If
What i need is that if i call the Upload-Page from one of the two Pages the functions of the Upload-Page should be restricted.
For Example: If i call the Upload-Page then Checkbox.Disabled = true and from the other page Checkbox should be enabled.
My idea was to send a second parameter from that page, then get the parameter with Request.QueryString and then use if/else to enable oder disable that checkbox.
Question is, is there another, better possibility to do that what i want? If yes how can i do that?
Using
QueryStringmay cause a security violation , Why not you useSessionparameter,when you Call it from the First Page then set
in the second page load check
and Vise Versa in the first page load.