Hi
I'm passing Ajax arguments from a source ASP.NET page to destination ASP.NET page. The code snippet looks like the following:
$('#sourcePageBtn').click( function() {
$.post('destination.aspx', { name: "John", time: "2pm" }, function(data) {
});
});
I'm trying to access the arguments in the script section of the destination aspx file i.e.
<script language="C#" runat="server">
protected void Page_Load ( object src, EventArgs e)
{
//Creating dynamic asp controls here
}
</script>
My specific need for the arguments in the Page_Load of the script section stems from the fact that I am creating a few dynamic Chart controls in the Page_Load which depend on these arguments.
Problem: - I don't see the arguments in the destination file. I tried to fetch them using Request["name"]
and Request["time"]
.
Please let me know where it has gone wrong.
P.S. - I had this SO post which dealt with launching a new page from the jQuery section of source page and at the end all worked fine except for this argument capture.
cheers