HighTechTalks DotNet Forums  

Naming Container difference between VS2003 and VS2005

ASP.net Building Controls microsoft.public.dotnet.framework.aspnet.buildingcontrols


Discuss Naming Container difference between VS2003 and VS2005 in the ASP.net Building Controls forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Monty
 
Posts: n/a

Default Naming Container difference between VS2003 and VS2005 - 12-04-2007 , 03:30 PM






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.



Reply With Quote
  #2  
Old   
Monty
 
Posts: n/a

Default Re: Naming Container difference between VS2003 and VS2005 - 12-04-2007 , 03:37 PM






Whoops, wrong group. I've moved it to framework.aspnet.


"Monty" <monty (AT) community (DOT) nospam> wrote

Quote:
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.




Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.