Click here to Skip to main content
15,909,896 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I am working in ASP.Net Project and sometimes we are using this code to send data.
JavaScript
Javascript
{
    var TrxId = window.document.getElementById('hdnContractID').value ;
    
    window.open('../TemplateViewer.aspx?ContractId='+TrxId + '&intSubModuleId=1', 'new','width=585,height=489,top=190,left=300,status=yes,scrollbars=yes','true');

}


We read this value By VB.Net
VB
VB
{
    dim x as string 
    x=Request("ContractId")
}


When I clicked F12 in Request()
>>>>>>> to
Request() As System.Web.HttpRequest

System.Web.UI.Page.Request


How can I read value in c#?
TemplateViewer.aspx?ContractId=5


As VB please.
Posted
v2

Hey there,

Try, Request.QueryString["ContractId"] or Request["ContractId"]


Azee...
 
Share this answer
 
v5
string ContractId=Request.QueryString[0].toString();

string intSubModuleId=Request.QueryString[1].toString();
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900