sansat6699 Posted May 23, 2008 Share Posted May 23, 2008 i have 2 forms, on form named "A" i making some selection and click on button present on form A which opens form named "B", but i want to do it without post back and pass selected parameters on form A to form B all without postback. i knew parameters can be passed with querystring and postback can be avoided using onlclientclick function using java script all this need to be done in c# codebehind file but i am not getting success _btnallhrpt.Attributes.Add("onclick","window.open('~/sales/allchrpt.aspx?fdt='" +PickerFrom.SelectedDate.ToString ()+ "'&tdt='"+PickerTo.SelectedDate.ToString()+"','','toolbar=no');return false;"); this is what i am trying in page A's page load event but it is not working, plese help me. Link to comment Share on other sites More sharing options...
aspnetguy Posted May 23, 2008 Share Posted May 23, 2008 remove the ~ from the window.open path. Javascript doesn't understand this as it is an ASP.Net thing. If you are trying to say that the sales folder is in the root folder of the application then just start the path with / Link to comment Share on other sites More sharing options...
sansat6699 Posted May 24, 2008 Author Share Posted May 24, 2008 remove the ~ from the window.open path. Javascript doesn't understand this as it is an ASP.Net thing. If you are trying to say that the sales folder is in the root folder of the application then just start the path with /thanks thank you very much Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.