How can I send data from one page to Another page's Gridview row.
-
I have a gridview and have following columns:
<asp:TemplateField HeaderText="Test" > <ItemTemplate> <asp:TextBox ID="txtTest" runat="server" Width="200px" MaxLength="30" Text='<%# Eval("TestString") %>' /> </ItemTemplate> </asp:TemplateField> <asp:TemplateField HeaderText="Click Here" > <ItemTemplate> <asp:Button ID="cmd1" CommandName="cmd1" CommandArgument='<%# Container.DisplayIndex %>' Text="ClickHere" OnClientClick="openpage2(this);return false;" runat="server" /> </ItemTemplate> </asp:TemplateField>
a textbox and a command button. OnClientClick of the command button i have opened a new page Now i need to pass the value to the clicked row textbox from the new window. Do anyone know how to acheive this -
I have a gridview and have following columns:
<asp:TemplateField HeaderText="Test" > <ItemTemplate> <asp:TextBox ID="txtTest" runat="server" Width="200px" MaxLength="30" Text='<%# Eval("TestString") %>' /> </ItemTemplate> </asp:TemplateField> <asp:TemplateField HeaderText="Click Here" > <ItemTemplate> <asp:Button ID="cmd1" CommandName="cmd1" CommandArgument='<%# Container.DisplayIndex %>' Text="ClickHere" OnClientClick="openpage2(this);return false;" runat="server" /> </ItemTemplate> </asp:TemplateField>
a textbox and a command button. OnClientClick of the command button i have opened a new page Now i need to pass the value to the clicked row textbox from the new window. Do anyone know how to acheive thisrprateek wrote:
OnClientClick of the command button i have opened a new page
You can Pass The GridView Row Index or Any ID that is identical with this row and send this as Query string while opening the page. And Read the data from that same id in next page.
cheers, Abhijit CodeProject MVP My Recent Article : Exploring Session in ASP.Net
-
rprateek wrote:
OnClientClick of the command button i have opened a new page
You can Pass The GridView Row Index or Any ID that is identical with this row and send this as Query string while opening the page. And Read the data from that same id in next page.
cheers, Abhijit CodeProject MVP My Recent Article : Exploring Session in ASP.Net
thanks for the reply how would i pass row index that's what is my question
-
thanks for the reply how would i pass row index that's what is my question
rprateek wrote:
how would i pass row index that's what is my question
Read This one Get GridView selected row DataKey in Javascript[^] :)
cheers, Abhijit CodeProject MVP My Recent Article : Exploring Session in ASP.Net