473,378 Members | 1,347 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

HTML Server Controls!

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
Nov 19 '05 #1
3 1225
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
Nov 19 '05 #2
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
Nov 19 '05 #3
Me
You have to add a declaration for the HTML table in the code behind file:

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

"Adam Knight" wrote:
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

Nov 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Hari | last post by:
What is the difference between HTML controls, HTML server controls , ASP.Net controls? Which will give more performance?
2
by: Hazzard | last post by:
I just realized that the code I inherited is using all asp.net server controls (ie. webform controls) and when I try to update textboxes on the client side, I lose the new value of the textbox when...
1
by: Matthew Louden | last post by:
Personally, I am totally confused with the following control terms and usage and advantages of each one in ASP.NET web application. Here's what I know so far.. 1. HTML Client Control: understood...
3
by: mca | last post by:
Hi everyone, I'm new to asp.net and i have a question about separating the html code from the programming code. i have an unknown numbers of entries in my table. I want to make a hyperlink...
4
by: clintonG | last post by:
Technically speaking, this issue is not about modifying the HTML generated by server controls but preceding the HTML generated by server controls with an HTML control generated on the basis of the...
5
by: siaj | last post by:
Hello All, Can any one give me a clue when to use Web Server controls/ HTML server controls/HTML Controls. As I understand .. HTML controls should be used if u dont need to refer it in the code...
20
by: Guadala Harry | last post by:
In an ASCX, I have a Literal control into which I inject a at runtime. litInjectedContent.Text = dataClass.GetHTMLSnippetFromDB(someID); This works great as long as the contains just...
5
by: Brian Kitt | last post by:
I have a C# application that builds dynamic HTML and renders it. Because it is rendered in this way, the input controls are not server controls. I write the entire page, which has a variable...
4
by: SAI | last post by:
Both have "TextBox" element and "Runat server". I don't understand the difference. Please advise. Thanks.
5
by: serge calderara | last post by:
Dear all, I am new in asp.net and prepare myself for exam I still have dificulties to understand the difference between server control and HTML control. Okey things whcih are clear are the fact...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.