HTML Server Controls!

A

Adam Knight

Hi All,

I am finding in VS that i can't access properties of HTML Server Controls
from within my code behind file.

Can anyone tell me is this normal?
How do i reference HTML Server Controls from within my code behind file?

Cheers,
Adam
 
A

Adam Knight

To Clarify,

<table ID="UpdteForm" Runat="server" border="0" width="350">
<tr runat="server">
<td runat="server" align="right"><asp:TextBox ID="txtName" Width="200"
Runat="server"></asp:TextBox></td>
<td runat="server" align="right" width="120">
<asp:Button ID="btnUpdate" Runat="server" Text="update"/>
<asp:Button ID="btnCancel" Runat="server" Text="cancel"/>
</td>
<td runat="server" align="right" width="30">
<asp:Button ID="btnSave" Runat="server" Text="save"/>
</td>
</tr>
</table>

In Page_Load Method in my code behind:

When i try to refer to 'UpdteForm.?.?' a message is issued saying
'UpdteForm' hasn't been declared.

Cheers,
AK
 
G

Guest

You have to add a declaration for the HTML table in the code behind file:

Protected UpdteForm as System.Web.UI.HtmlControls.HtmlTable
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,190
Members
46,740
Latest member
AdolphBig6

Latest Threads

Top