D
Diana Fijman
Hello everyone.
I have the following problem:
I'm building a website, that as a fact that is entered into a
textbox, loading the contents of the query to a datatable, I put as
datasource of a gridview, and then do the databind, the data are listed
without inconvenience. The gridview has a template column defined as
field with the following code:
<asp:TemplateField>
<ItemTemplate>
<asp:ImageButton ID="ImageButton1" runat="server"
ImageUrl="~/link.jpg" CommandName="Select" />
</ItemTemplate>
</asp:TemplateField>
Clicking on any row of the gridview, by event
OnSelectedIndexChanged, I access the data in that row and do a
response.redirect to a second page to enter the data I need,
based on the parameters I pass url, then do the update to the table,
All this works fine and the data is updated. In the second
page return a session variable so that when you reload the
first page asks for this variable and if true return
to make the original query to the table to update the gridview, the
Indeed I did the debug and in theory this works, but the change is not
reflected in the gridview. What is striking is that for example, if I move
page of gridview, to return to the first (where the row modified)
if change is reflected.
This is the code I use in the Page_Load of the first page:if
(Session["Refresh"] != null)
{
if (Session["Refresh"].ToString() == "True")
{
Session.Remove("Refresh");
gv(); ---- function that makes the query to fill the
datatable and then databind
}
}
Would greatly appreciate some guidance on what may be happening.
Greetings,
I have the following problem:
I'm building a website, that as a fact that is entered into a
textbox, loading the contents of the query to a datatable, I put as
datasource of a gridview, and then do the databind, the data are listed
without inconvenience. The gridview has a template column defined as
field with the following code:
<asp:TemplateField>
<ItemTemplate>
<asp:ImageButton ID="ImageButton1" runat="server"
ImageUrl="~/link.jpg" CommandName="Select" />
</ItemTemplate>
</asp:TemplateField>
Clicking on any row of the gridview, by event
OnSelectedIndexChanged, I access the data in that row and do a
response.redirect to a second page to enter the data I need,
based on the parameters I pass url, then do the update to the table,
All this works fine and the data is updated. In the second
page return a session variable so that when you reload the
first page asks for this variable and if true return
to make the original query to the table to update the gridview, the
Indeed I did the debug and in theory this works, but the change is not
reflected in the gridview. What is striking is that for example, if I move
page of gridview, to return to the first (where the row modified)
if change is reflected.
This is the code I use in the Page_Load of the first page:if
(Session["Refresh"] != null)
{
if (Session["Refresh"].ToString() == "True")
{
Session.Remove("Refresh");
gv(); ---- function that makes the query to fill the
datatable and then databind
}
}
Would greatly appreciate some guidance on what may be happening.
Greetings,