Can't duplicate ID in subclassed GridView

D

David Thielen

Hi;

I switched two controls from GridView to EmptyGridView. When it was GridVIew
both controls (on the same page) had a
<Columns><TemplateField><ItemTemplate><LinkButton ID="DeleteButton"... and it
was ok that both had the same ID name.

Once I switched to EmptyGridView that is now an error and I cannot build
unles I rename one. As EmptyGridView inherits from GridView why is this a
problem?

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

Cubicle Wars - http://www.windwardreports.com/film.htm
 
W

Walter Wang [MSFT]

Hi David,

This is a quick note to let you know that I am performing research on this
issue and will get back to you as soon as possible. I appreciate your
patience.

Sincerely,
Walter Wang ([email protected], remove 'online.')
Microsoft Online Community Support

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications. If you are using Outlook Express, please make sure you clear the
check box "Tools/Options/Read: Get 300 headers at a time" to see your reply
promptly.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
 
W

Walter Wang [MSFT]

Hi David,

Unfortunately I haven't found further information regarding this issue.
However, we could use another workaround.

We could use <tagMapping> in web.config to automatically change all
<asp:GridView> to use inherited EmptyGridView, provided that you want all
GridView in your web site to convert to EmptyGridView.

<system.web>
<pages>
<tagMapping>
<add tagType="System.Web.UI.WebControls.GridView"
mappedTagType="myns.EmptyGridView,App_Code" />
</tagMapping>
</pages>
</system.web>

Using this way, you don't need to modify your existing WebForm to change
tag <asp:GridView> to EmptyGridView, thus will not cause the issue you've
mentioned.

In the meanwhile, please feel free to submit your feedback at
http://connect.microsoft.com/Main/content/content.aspx?ContentID=2220
regarding this issue.

Please let me know whether or not this works for you. Thanks.

Regards,
Walter Wang ([email protected], remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
 
W

Walter Wang [MSFT]

Sure, we will report this to product team. Thank you for your feedback.

Regards,
Walter Wang ([email protected], remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
 

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,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top