Hi friends,
I have aspx page(uses master page), which has two iFrame
1. it contains dropdown list to filter the data
2. it holds the data to be displayed
My problem is, in 1st iFrame through javascript I'm setting 2nd iFrame src depending upon the dropdown value selected. 2nd iFrame src URL contains parameter in the query string
eq. wf_PrjEstDetails.aspx?id=0"
but when I try to access the parameter in the querystring in the wf_PrjEstDetails.aspx page using
Request.QueryString["id"]
, it gives me null value.
Can you please tell me how i can pass and access the parameter in the querystring ?
This is my JavaScript Method:
function openWinSPV(strPath, object,objname)
{
var selectedText = window.parent.frames(0).window.document.getElementById('ddlAccount').selectedIndex;
var drpacc = window.parent.frames(0).window.document.getElementById('ddlAccount').options[selectedText].text;
if(drpacc.indexOf("Select")!=-1)
{
alert('Please select an account!!!');
return false;
}
selectedText = window.parent.frames(0).window.document.getElementById('ddlContract').selectedIndex;
var drpcontract = window.parent.frames(0).window.document.getElementById('ddlContract').options[selectedText].text;
if(drpcontract=="" ||drpcontract.indexOf("Select")!=-1)
{
alert('Please select the Contract!!!');
return false;
}
selectedText = window.parent.frames(0).window.document.getElementById('ddlAccount').selectedIndex;
var arg= window.parent.frames(0).window.document.getElementById('ddlAccount').value;
strPath+="&id1="+ arg;
arg= window.parent.frames(0).window.document.getElementById('ddlContract').value;
strPath+="&id2="+ arg;
if(window.parent.frames(0).window.document.getElementById('lblGrName')!= null)
{ arg= window.parent.frames(0).window.document.getElementById('ddlGroup').value;
strPath+="&id3="+ arg;
}
else
{
strPath+="&id3=0";
arg=window.parent.frames(0).window.document.getElementById('ddlEstimate').value;
strPath+="&id4="+ arg;
strPath = strPath + "&random='" + Math.random() + "'";
alert(strPath);
window.parent.frames(2).document.location.href = strPath;
}
I have written jquery method in wf_PrjEstDetails.aspx page
$(document).ready(function () {
var qs = window.location.toString();
alert(qs);
});
It gives some URL with encrypted parameters, is this reason in code behind it is not able to find id in QueryString??
Any idea??
Thanks in advance