How need I to refresh my page after SqlDataSource1.DataBind(); for my GridView appears this new data.
+1
A:
A grid view has a DataBound event to which you can subscribe to and achieve the desired behaviour by calling Response.Redirect(Request.RawURL)
or via javascript window.location.reload()
James
2010-01-19 11:57:20
Update that to Response.Redirect(Request.RawUrl);
Dejan.S
2010-01-19 12:02:38
since you seem to be living in victorian with the way your question is written...:PNo ... that's my Russian accent >___<
nCdy
2010-01-19 12:06:23
By the way ... nothing happens.Making protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e) { SqlDataSource1.SelectParameters[2].DefaultValue = "1"; SqlDataSource1.DataBind(); Response.Redirect(Request.RawUrl);T_T
nCdy
2010-01-19 12:08:46
It might be that you have not put AutoPostBack="true" on the dropdown, cause the response.redirect() will redirect you.
Dejan.S
2010-01-19 12:16:37
@Dejan updated to use Request.RawURL @nCdy...apologies then, however, I have noticed your other questions see to be written fine :P
James
2010-01-19 12:22:39
AutoPostBack="true" helps me :) Thank you very much ^_^take a look to my other questions without answers here :P
nCdy
2010-01-19 12:31:10
@nCdy, my apologies then I actually thought you wrote it deliberatly that way! I have updated.
James
2010-01-19 13:22:10