How to get the current page textbox text

venky

Active member
Joined
Sep 12, 2005
Messages
27
Programming Experience
1-3
Hi

My problem is in the textbox control i was print sth.I want to print this text in the same page after post back(i. buton click).How is it possible . plz help me.
 
Any chance you could rephrase that? Also, do you really mean "print", as in "writing output to paper"?
 
Added textox to the table cell after page reload it disappear

Hi


ViewState.Add("flag", 1);
TableCell tc = new TableCell();
TableRow tr = new TableRow();
TextBox t = new TextBox();
t.ID =
"TB" + ViewState["flag"].ToString();
t.Text =
"Venky" + ViewState["flag"].ToString();
tc.Controls.Add(t);
tr.Cells.Add(tc);
Table1.Rows.Add(tr);

At the first time page load it will apppear but,After pressing any button on the page . the textbox on the table disappear.How we get the previous stage of the table even after pressing the button.


 
Programmatic additions or modifications to a table row or cell will not persist across posts to the server. Table rows and cells are controls of their own, and they are not properties of the Table control. Changes to table rows or cells must be reconstructed after each post to the server.

If the above (C#??) code is within an IsPostBack clause of form load you must move it outside or find other ways to manage the webpages dynamic content.
 
Back
Top