Hi guys,
I have asp.net page,
where i have javascript function with three parameters.
&
i'm calling this function from a repeater.
javascript
<script type="text/javascript">
function UpdateDiff(RegNo, ddlval, filedate) {
$('.Display').attr('href', 'UpdateDifferences.aspx?RegNo=' + RegNo + ' &Status=' + status + ' &filedate=' + filedate + '');
$('.Display').trigger('click');
}
</script>
Calling from repeater
<a class="Display" href="UpdateDifferences.aspx"><asp:ImageButton ID="imgView" Visible="true" runat="server"
OnClientClick='<%# String.Format("javascript:return UpdateDiff({0},{1},{2})", Eval("RegNo") , Eval("Status") , Eval("File_Date")) %>'
ToolTip="Edit" ImageUrl="~/images/Edit.png"
Width="20" Height="20" />
</a>
When checked its 'inspect element' in chrome, its passing the values to the function.
i'm passing these values as query string to other page.
but on other page, i'm not getting these values.
string URL = HttpContext.Current.Request.Url.AbsolutePath;
string Reg = Request.QueryString["RegNo"].ToString();
string Sts = Request.QueryString["Status"].ToString();
string fdt = Request.QueryString["filedate"].ToString();
string data = URL + Reg + Sts + fdt;
Response.Write(data);
PageSource View:
<a class="Display" href="UpdateDifferences.aspx"><input type="image" name="ctl00$MainContent$Repeater1$ctl01$imgView" id="MainContent_Repeater1_imgView_0" title="Edit" src="images/Edit.png" onclick="javascript:return UpdateDiff(23155,Yes,11/30/2014);" style="height:20px;width:20px;" />
</a>
Can any one please check the code where the code is not correct.
Thanks