Naming Container difference between VS2003 and VS2005

M

Monty

I have an ASP.Net project I developed in VS2003 (ASP.Net 1.1) that works
fine, but when I convert it to VS2005 (ASP.Net 2.0) it's behavior seems to
change. I have the following datagrid in my project:

<asp:datagrid id="grid" runat="server" AutoGenerateColumns="False"
AllowSorting="False" DataKeyField="myID">
<Columns>
<asp:TemplateColumn HeaderText="Action">
<ItemTemplate>
'''''''NOTE FOLLOWING LINE:
<input Runat="server" ID="SelectedRequest" type="hidden"
NAME="SelectedRequest" />
'''''''NOTE PREVIOUS LINE ^
<asp:Literal Runat="server"
ID="litRadioButtons"></asp:Literal>
</ItemTemplate>
</asp:TemplateColumn>
<asp:TemplateColumn HeaderText="Action Message">
<ItemTemplate>
Message:<br>
<asp:TextBox ID="txtMessage" Runat="server" />
</ItemTemplate>
</asp:TemplateColumn>
</Columns>
</asp:datagrid>

When I run this page in VS2003, the line noted above is rendered as:

<input name="grid:_ctl2:SelectedRequest" id="grid__ctl2_SelectedRequest"
type="hidden" />

But when I run my converted project in VS2005, it is rendered as:

<input name="SelectedRequest" type="hidden" id="SelectedRequest" />

What am I missing here? Why isn't the ID of my input control being modified
by it's naming container?

TIA.
 

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

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top