Click here to Skip to main content
15,896,348 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
thanks a lot i have done it and ,how to pass the date and time from one asp page to the other.

this is my emp.aspx page



C#
protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)
    {
        GridViewRow row = GridView1.SelectedRow;
        
        String dt = GridView1.SelectedRow.Cells[1].Text;
        String sal = GridView1.SelectedRow.Cells[2].Text;
       
        Response.Redirect("empupdate.aspx?dt=" + dt + "&sal=" +sal);
     }


my second file empupdate.aspx
C#
protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            
            TextBox3.Text = Page.Request.QueryString["dt"].ToString();
            TextBox4.Text = Page.Request.QueryString["sal"].ToString();
            
            
        }
    }

what i need to change to get the date and time value in the texbox3 of the empupdate.aspx
Posted
Updated 24-Oct-11 23:54pm
v2
Comments
RaisKazi 25-Oct-11 5:46am    
Your code seems to be Ok. What is the problem then?
ashok_89 25-Oct-11 5:49am    
sorry i forgt the"=",thanks a lot for viewing only after which i saw the code.
thanks a lot
RaisKazi 25-Oct-11 5:58am    
Ok. So your problem got resolved or what?
ashok_89 25-Oct-11 6:01am    
yup i solved thanks a lot.
BobJanova 25-Oct-11 5:56am    
I don't understand what the question is. This code should do what it appears you're asking already.

1 solution

How to: Pass Values Between ASP.NET Web Pages[^] should be able to help you (if that was your question).
 
Share this answer
 

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