Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Building Controls > Naming Container difference between VS2003 and VS2005

Reply
Thread Tools

Naming Container difference between VS2003 and VS2005

 
 
Monty
Guest
Posts: n/a
 
      12-04-2007
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
 
 
 
 
Monty
Guest
Posts: n/a
 
      12-04-2007
Whoops, wrong group. I've moved it to framework.aspnet.


"Monty" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
>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

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Naming Container difference between VS2003 and VS2005 Monty ASP .Net 7 12-10-2007 05:10 AM
while executing my client program i get the exception javax.naming.LinkException: [Root exception is javax.naming.LinkException: [Root exception is javax.naming.NameNotFoundException: remaining if plz anybody know how to solve this problem then mahesh Java 0 03-08-2007 12:26 PM
What is the difference about asp.net mobile in VS2003 from VS2005 ? Nick ASP .Net Mobile 0 02-20-2006 07:29 PM
Difference between bin and obj directories and difference between project references and dll references jakk ASP .Net 4 03-22-2005 09:23 PM
Can I install tigether VS2003 and VS2005 on the same computer vaidas gudas ASP .Net 1 07-13-2004 10:25 AM



Advertisments