Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

asp tables and custom controls

Status
Not open for further replies.

andyUK

Programmer
Dec 19, 2000
39
0
0
GB
I have been working on a control that dynamically builds a table based on the curretn session.

If the user isnt logged in it creates a log in box with username and password plus a submit button. Now when i try to access the txtusername.text value it says its not declared. I have tried various methods but none seem to access the details.

The control is on the page but appears as child of the table should i be accessing it differently:

current method: context.response.write(txtusername.text)

this when compile says not declared. but if i insert
Protected txtusername as textbox it compiles btu falls over later.

the Trace shows the text box and the other controls. I have included this at the base of the message. Hope someone can help.

Many Thanks

Andrew

-------
aspx.page Begin Init
IN Table menu 0.000186 0.000186
aspx.page End Init 0.000242 0.000057
aspx.page Begin LoadViewState 0.000275 0.000032
aspx.page End LoadViewState 0.000549 0.000274
aspx.page Begin ProcessPostData 0.000609 0.000060
aspx.page End ProcessPostData 0.000726 0.000117
aspx.page Begin ProcessPostData Second Try 0.000769 0.000042
aspx.page End ProcessPostData Second Try 0.000799 0.000030
aspx.page Begin Raise ChangedEvents 0.000829 0.000030
aspx.page End Raise ChangedEvents 0.000859 0.000030
aspx.page Begin Raise PostBackEvent 0.000890 0.000031
login button click 0.000928 0.000038
aspx.page End Raise PostBackEvent 0.000960 0.000032
aspx.page Begin PreRender 0.000993 0.000032
aspx.page End PreRender 0.001033 0.000040
aspx.page Begin SaveViewState 0.001832 0.000799
aspx.page End SaveViewState 0.001959 0.000128
aspx.page Begin Render 0.001996 0.000036
aspx.page End Render 0.003436 0.001440
Control Tree
Control Id Type Render Size Bytes (including children) Viewstate Size Bytes (excluding children)
__PAGE ASP.default_aspx 1856 20
_ctl1 System.Web.UI.ResourceBasedLiteralControl 501 0
_ctl2 System.Web.UI.LiteralControl 10 0
_ctl0 System.Web.UI.HtmlControls.HtmlForm 1305 0
_ctl3 System.Web.UI.ResourceBasedLiteralControl 388 0
MainMenu WMSMenu.MenuHandler 481 0
_ctl4 System.Web.UI.WebControls.TableRow 34 0
_ctl5 System.Web.UI.WebControls.TableCell 19 0
_ctl6 System.Web.UI.LiteralControl 8 0
rUserName System.Web.UI.WebControls.TableRow 112 0
cUserName System.Web.UI.WebControls.TableCell 83 0
txtUsername System.Web.UI.WebControls.TextBox 57 0

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top