how to Pass two parameters using Eval in hyperlink in gridview
-
Hi All, I am facing some problem in passing tweo parameters using Eval in GridView. I tried like this, but there is some javascript error- ]]>' Text= '<%# Bind("AcceptNumber") %>'> //the javascript function-- function OpenDialog(rid,AcceptNumber) { window.showModalDialog( "PopupAccept.aspx?ReturnList?ReportNumber= "+ rid+ "&AcceptNumber="+ AcceptNumber+ " ',window, 'dialogWidth:800px;pxcenter:yes;help:no;resizable:no;status:no ") } when i click on hyperlink in GridView, it shows some havascript error. this error says that the second parameter i passed , is not identified. can anybody tell me how to pass two parameters in a javascript function using Eval. Please help me.
-
Hi All, I am facing some problem in passing tweo parameters using Eval in GridView. I tried like this, but there is some javascript error- ]]>' Text= '<%# Bind("AcceptNumber") %>'> //the javascript function-- function OpenDialog(rid,AcceptNumber) { window.showModalDialog( "PopupAccept.aspx?ReturnList?ReportNumber= "+ rid+ "&AcceptNumber="+ AcceptNumber+ " ',window, 'dialogWidth:800px;pxcenter:yes;help:no;resizable:no;status:no ") } when i click on hyperlink in GridView, it shows some havascript error. this error says that the second parameter i passed , is not identified. can anybody tell me how to pass two parameters in a javascript function using Eval. Please help me.
I miss an ; at the end of your :
window.showModalDialog( "PopupAccept.aspx?ReturnList?ReportNumber= "+ rid+ "&AcceptNumber="+ AcceptNumber+ " ',window, 'dialogWidth:800px;pxcenter:yes;help:no;resizable:no;status:no ")
Another way is to fill 2 hidden fields within this page through your JS. After filling these hidden fields do a __Postback(...... (search for __Postback). Your page will reload and in your codebehind (.aspx.cs file) you can check if the hiddenfields have a value.
-
I miss an ; at the end of your :
window.showModalDialog( "PopupAccept.aspx?ReturnList?ReportNumber= "+ rid+ "&AcceptNumber="+ AcceptNumber+ " ',window, 'dialogWidth:800px;pxcenter:yes;help:no;resizable:no;status:no ")
Another way is to fill 2 hidden fields within this page through your JS. After filling these hidden fields do a __Postback(...... (search for __Postback). Your page will reload and in your codebehind (.aspx.cs file) you can check if the hiddenfields have a value.
thaks a lot