CodeVerge.Net Beta


   Explore    Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums




Can Reply:  No Members Can Edit: No Online: Yes
Zone: > NEWSGROUP > Asp.Net Forum > windows_hosting.hosting_open_forum Tags:
Item Type: NewsGroup Date Entered: 1/20/2005 8:55:16 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
NR
XPoints: N/A Replies: 2 Views: 226 Favorited: 0 Favorite
3 Items, 1 Pages 1 |< << Go >> >|
ste810
Asp.Net User
Difference between overriding WebControl.RenderBeginTag() and Control.TagName1/20/2005 8:55:16 PM

0

Hi,

I am not sure if I completely grasp the difference in meaning of overriding WebControl.RenderBeginTag(HtmlTextWriter) and overriding Control.TagName.

For a custom control that inherits from an existing .NET server control, it has access to both of them. So if I want to change the beginning of the rendering of my custom control, which one should I override? Should they be mutually exclusive where you should only use one but not both at one time in your custom control?

I understand that when I write my own own MyCustomControl : .NET Server Control, if I don't like it being wrapped with a <span> tag, I can override TagKey.

If I cannot find my tag in HtmlTextWriterTag, ie. I have a weird begin tag, I can override TagName, meaning TagKey and TagName should be mutually exclusive.

But I struggle the difference between RenderBeginTag() and TagName... Experts please?
llangleyben
Asp.Net User
Re: Difference between overriding WebControl.RenderBeginTag() and Control.TagName1/30/2005 12:27:22 PM

0

Hi,
You are right, RenderBeginTag implementation of WebControl use RenderBeginTag method of HtmlTextWriter to render opening tag by TagKey or, if it is not recognized, by TagName. It adds attributes and styles to HTML element in process. Usually it is enough to override TagKey or TagName in custom control. You should override RenderBeginTag only if very unusual, odd rendering required.

Leon Langleyben

MCSD, ASP.NET MVP

Blog
master4eva
Asp.Net User
Re: Difference between overriding WebControl.RenderBeginTag() and Control.TagName2/6/2005 6:11:04 AM

0

Yes, whatever he said :-) .

The difference is, well... which one is easier to determine the tags in your code? Of course it will be with the overriding of the TagKey property... the RenderBeginTag method is there only for extreme cases.
-- Justin Lovell
3 Items, 1 Pages 1 |< << Go >> >|


Free Download:


Web:
Difference between overriding WebControl.RenderBeginTag() and ... RenderBeginTag(HtmlTextWriter) and overriding Control.TagName. ... But I struggle the difference between RenderBeginTag() and TagName. ...
ASPRunner.NET. Articles. Basics of creating server controls. Part ... Since I will not discuss saving data between postbacks and using .... WebControl class exists, which has basic set of properties for control style customization. ... public virtual void RenderBeginTag(HtmlTextWriter writer ) ... If necessary, we need to override TagKey or TagName properties (WebControl uses tag by ...
Overview of user controls vs. custom controls Describes the differences between user controls and custom controls. ... <%@ Register TagPrefix="UC" TagName="TestControl" Src="test.ascx" %> ... WebControls .WebControl if you want the control to render HTML that ..... However, if you still want to override the Render method, you must override the RenderBeginTag ...
The WebControl Base Class and Control Styles require that we override the Render() method of the base Control class to emit ... WebControl constructor or by setting either the TagKey or TagName ... RenderBeginTag() method of WebControl. The WebControl version of ..... about the differences, which makes developing cross-browser-friendly web pages as well as ...
A Crash Course on ASP.NET Control Development: Deriving New ... There's no real structural difference between the two families; ... The button Web control, though, provides a slightly richer programming interface representing a .... NET controls and overridden only in a few cases. The RenderBeginTag ... Basically, each list control maintains a tag name internally (it's Select) ...

Difference between overriding WebControl.RenderBeginTag() and ... Difference between overriding WebControl.RenderBeginTag() and Control.TagName, > ROOT > NEWSGROUP > Asp.Net Forum ...
Difference between user control and master page ? - ng.asp-net ... You then declare a user control PageUtil object in MasterPage class ... difference between overriding webcontrol.renderbegintag() and control.tagname . ...
Repeater with multiple itemtemplates - ng.asp-net-forum.windows ... setting sub properties in visualstudio property browser. difference between overriding webcontrol.renderbegintag() and control.tagname ...






info about 1and1 hosting for beginners

need help with featured ads...

sql server 2000

change the look

i need a working example like this in classifieds.

new to asp & have some questions (don't we all)

this is a pain...login failed for user 'nt authority\network service'

switching themes

i am sick with the the old beta classified banner.

error getting started please help!

enhancing the description box

i would like to offer $50 for the help

csk difficult to understand

changing sql connection settings

i'm having trouble seeing my page when i publish it to a server

adding a new page in topmenurepeater

extended classified site web config error

how to show "what's new" table in default page

silly question...masterpage format

how do i remove one of the tabs at the top?

why is my page blinking so much... question: i just downloaded the starter kit . why is the page in french.?

first instilation error message

filling the advts locally and then uploading every 2 hours/night

masterpage repeater problem

how do you make the respond to ad go to your e-mail?

server error in '/' application...help!!!!!!!!

classified ad page not working

how to create a range browse?

server application unavailable on live site with godaddy

table format

   
  Privacy | Contact Us
All Times Are GMT