Click here to Skip to main content
15,895,142 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
i have two pages.

1)1st page where a link button is there...that navigates to next page
2)once i click on link button on first page...navigate to second page[its actually a modal pop up type a separte window]. I insert records in this page in 2nd page in the grid. When i close this window,,,, and again i click on link button on first page,,,i find no records there in the grid,,,
but when i run again my code the data is there,,,,

the first page code:

C#
protected void gridShuttleAdmin_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        if (e.Row.RowType == DataControlRowType.DataRow)
        {
            //onmouse over and mouse out on the grid color changes
            e.Row.Attributes.Add("onmouseover", "this.previous_color=this.style.backgroundColor;this.style.backgroundColor='PaleGreen'");
            e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor=this.previous_color;");

            Label lbltrip = (Label)e.Row.FindControl("lbltrip");
            if (lbltrip != null)
            {
                Label lblshuttledetailname = (Label)e.Row.FindControl("lblshuttledetailname");
                Label lblshuttlefacilityid = (Label)e.Row.FindControl("lblshuttlefacilityid");
                Label lblfacilityid = (Label)e.Row.FindControl("lblfacilityid");
                LinkButton lbtn = (LinkButton)e.Row.FindControl("lnkviewID");
                lbtn.Attributes.Add("onClick", "var sFeatures='dialogHeight: 700px;dialogWidth: 1000px;'; window.showModalDialog('Shuttle_StopDetails.aspx?shuttlefacilityid=" + lblshuttlefacilityid.Text + "&facility =" + lblfacilityid.Text + "&Trip = " + lbltrip.Text + "','',sFeatures);window.document.forms[0].submit();");
                 
               
            }
        }      
    }

/* lbtn.Attributes.Add("onClick", "var sFeatures='dialogHeight: 700px;dialogWidth: 1000px;'; window.showModalDialog('Shuttle_StopDetails.aspx?shuttlefacilityid=" + lblshuttlefacilityid.Text + "&facility =" + lblfacilityid.Text + "&Trip = " + lbltrip.Text + "','',sFeatures);window.document.forms[0].submit();");


here i m navigating to next page passing the parameters as query string
*/


/*lot of doubts are there....one more doubt over here is ('Shuttle_StopDetails.aspx?shuttlefacilityid=" + lblshuttlefacilityid.Text + "&facility =" + lblfacilityid.Text + "&Trip = " + lbltrip.Text + "','',sFeatures);window.document.forms[0].submit();");

here only the first parameter i am able to fetch,,,,in the next page,,,i m unable to fetch the other two parameters,,,am i doing anything wrong

trip_num = Request.QueryString["Trip"]; //here i am getting null

shuttlefacility_id = Request.QueryString["shuttlefacilityid"];//here i am able to fetch the data
*/
Posted
Updated 17-Jun-13 20:55pm
v4

1 solution

/*lot of doubts are there....one more doubt over here is ('Shuttle_StopDetails.aspx?shuttlefacilityid=" + lblshuttlefacilityid.Text + "&facility =" + lblfacilityid.Text + "&Trip = " + lbltrip.Text + "','',sFeatures);window.document.forms[0].submit();");

here only the first parameter i am able to fetch,,,,in the next page,,,i m unable to fetch the other two parameters,,,am i doing anything wrong

trip_num = Request.QueryString["Trip"]; //here i am getting null

shuttlefacility_id = Request.QueryString["shuttlefacilityid"];//here i am able to fetch the data
*/

I have solved this part myself...

actually there was space after "&Trip = "...it should be "&Trip ="


............but the first part grid refresh is pending.............................
 
Share this answer
 
v2

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