asp.net - cannot change GridView Caption -


Changing this gridview seems impossible. Captions after it is set once.

Once I set the caption and then change it to postback, all in the code look ok, page prerenders, gridview prerender and wherever

I do not know - Page (And also gridview) Preorder Event while debugging. The caption is fair, but it renders with the old caption also

The page appears to be presented once with caption, although I changed it is.

I also tried to replace it, to update and update the panels, but did not get help from this.

Can someone suggest? Thanks in advance.

In this example, it seems to work here, can you post your code?

  & lt;% @ Page language = "C #"%> & Lt ;; DOCTYPE HTML PUBLIC "- // W3C // DTT XHTML 1.0 Transcription // N" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> & Lt; Script runat = "server" & gt; Protected Zero Page_load (object sender, event events e) {if (IsPostBack) {System.Collections.Generic.List & lt; Int & gt; Value = new system oath. GenericList & lt; Int & gt; {1, 2, 3, 4, 5, 6, 7}; GrdTest.DataSource = Value; GrdTest.DataBind (); }} Secure void btnSubmit_Click (Object Sender, EventArgs e) {grdTest.Caption = "test grid" + DateTime.Now.ToString (); } & Lt; / Script & gt; & Lt; Html xmlns = "http://www.w3.org/1999/xhtml" & gt; & Lt; Head runat = "server" & gt; & Lt; Title & gt; & Lt; / Title & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt; Form id = "form1" runat = "server" & gt; & Lt; Div & gt; & Lt; Asp: GridView id = "grdTest" caption = "test grid" runat = "server" & gt; & Lt; Columns & gt; & Lt; ASP: TemplateField & gt; & Lt; ItemTemplate & gt; Hello & lt; / Item theme & gt; & Lt; / ASP: TemplateField & gt; & Lt; / Column & gt; & Lt; / ASP: GridView & gt; & Lt; ASP: Button ID = "BTN Sebuit" Runat = "Server" onclick = "btn submit_click" text = "submit" /> & Lt; / Div & gt; & Lt; / Form & gt; & Lt; / Body & gt; & Lt; / Html & gt;  

Comments

Popular posts from this blog

c# - ListView onScroll event -

PHP - get image from byte array -

Linux Terminal Problem with Non-Canonical Terminal I/O app -