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:
C#
protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
           
        }
    }

// Here i used ItemCommand EVENT
// and above code i want to use in page load Event  

    protected void gvUserInfo_ItemCommand(object sender, ListViewCommandEventArgs e)
    {
                
        DataTable dtchildpin = (DataTable)Session["dtchildpin"];
        Label pin = (Label)e.Item.FindControl("lblpin");
        dtchildpin = DAL.Sent_SmartPin.View(pin.Text.ToString());
        gvUserInfo.DataSource = dtchildpin;
        gvUserInfo.DataBind();
    }
Posted
v4
Comments
Sergey Alexandrovich Kryukov 5-Dec-12 1:19am    
Your code behind is probably too much behind. Due to close Christmas season, my access to your hard drive is somewhat limited... :-)
--SA
choudhary.sumit 5-Dec-12 1:30am    
ha ha ha... help him kryukov.
Sergey Alexandrovich Kryukov 5-Dec-12 1:37am    
After New Year, when my access to computers through the chimneys will become less busy. Or later... :-)
--SA

1 solution

You have to assign DataSource and call DataBind() in the Page_Load event
 
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