Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

changing the default tag for a custom gridview?

Posted on 2009-04-07
3
Medium Priority
?
356 Views
Last Modified: 2013-11-08
Hi There,

I have a custom gridview for which I'm trying to render compliant html. Which method do I need to override in order for the control to render the tag I tell it to? Currently the control is rendering as a <span> I need to change this to a div, so how can I do it?

Sean - thanks in advance for your answer.
0
Comment
Question by:MrAgile
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 14

Expert Comment

by:GiftsonDJohn
ID: 24085726
Asp.Net usually renders <asp:Label> as <span> and <asp:Panel> as <div>. You need to create custom template definition using <asp:Panel> to get rendered as <div>
0
 
LVL 8

Author Comment

by:MrAgile
ID: 24085784
Hi There,

Can you provide an example or link so I can see how this is done?

Sean

 
<span id="lstStuff"><div class="projectContainer" id="Container0">
	
                
</div></span>
          

Open in new window

0
 
LVL 6

Accepted Solution

by:
hehdaddy earned 2000 total points
ID: 24100831
You need to override these:

public override void RenderBeginTag(HtmlTextWriter writer)
{
}

public override void RenderEndTag(HtmlTextWriter writer)
{
}
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …

609 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question