Solved

changing the default tag for a custom gridview?

Posted on 2009-04-07
3
332 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
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 500 total points
ID: 24100831
You need to override these:

public override void RenderBeginTag(HtmlTextWriter writer)
{
}

public override void RenderEndTag(HtmlTextWriter writer)
{
}
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

910 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now