I want to select a row in Default.aspx gridview to populate the corresponding textboxes in Default2.aspx. I am using the pubs database with the table authors with linq to sql. I don not want to have Default2.aspx to have a gridview just textboxes. Thank you.
Default.aspx
<asp:GridView ID="GridView1" runat="server"> <Columns> <asp:TemplateField ShowHeader="False"> <ItemTemplate> <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="False" CommandName="Select" Text="Select">asp:LinkButton> ItemTemplate> asp:TemplateField> Columns> asp:GridView>
code behind:
protected void Page_Load(object sender, EventArgs e) { DataClassesDataContext db = new DataClassesDataContext(); var products = from p in db.authors select p; GridView1.DataSource = products; GridView1.DataBind(); }
Default2.aspx
au_lname<asp:TextBox ID="TextBox1" runat="server" /> <br /> au_fname <asp:TextBox ID="TextBox2" runat="server">asp:TextBox>
Posted Nov 19, 2008, 11:07 PM
Ryan AlfordPosted Nov 19, 2008, 10:50 PM
Posted Nov 19, 2008, 9:12 PM
Ryan AlfordPosted Nov 19, 2008, 9:00 PM
Posted Nov 19, 2008, 7:02 PM
Ok, here is what I really what to do. How to I hide the DistributorID when load
Ryan AlfordPosted Nov 19, 2008, 11:22 AM