A server control in classic ASP.NET is a component that dynamically renders a segment of markup to the client. Controls can be written in markup or coded, and can be bound to data and participate in different phases of the ASP.NET request-handling lifecycle. Out-of-box examples range from the simple (CheckBox which wraps the HTML input checkbox) and more complex (GridView which can be bound to various data sources and has built-in paging and sorting).
Questions tagged [servercontrols]
213 questions
1
vote
1 answer
More information about Custom Webcontrols?
Where I currently work we use a lot of hand made custom web controls for things like dropdown lists, auto-complete boxes, etc. and while I have added things to these controls I never really felt like I completely understood what the heck I was…

Mike Fielden
- 10,055
- 14
- 59
- 99
1
vote
0 answers
Extended Server Control DropDownList - get ListItemCollection Items ASP.NET
In a detailsview I have an extension of a dropdownlist server control that I have called ZZZZDropDown. The problem is that base.Items is empty at the time the extended server control gets called. So my logic fails as it requires the Items to have…

Darren
- 1,352
- 5
- 19
- 49
1
vote
3 answers
internet explorer cannot open the internet site
I have weird error, but that only appears to be happening in IE6, and it happens randomly.
I’m implementing omniture analytics on my company’s site. I made a literal server control and called it from inside an update panel. All the control does is…

user13053
- 243
- 1
- 2
- 8
1
vote
2 answers
how to get the non english value of a DataTextField and its DataValueField from a dropdownlist in asp.net
I have the following dropdownlist in my project which takes its data from its relevant SqlDataSource. The problem which I am facing with is that the dropdownlist includes non-english items(ProvinceName) and I can get neither the DataTextField value…

Elham Kohestani
- 3,013
- 3
- 20
- 29
1
vote
1 answer
How server side controls are accessible in code behind files in Asp.Net?
Just curious!
I was wondering, what actually happens so that any control that is defined in .aspx page and having "runat" attribute is accessible in code behind file?
.aspx page:
code behind page:
lbl.Text = "This is a label";
If anyone can share…

sunil20000
- 356
- 3
- 16
1
vote
1 answer
ASP.NET Extending the gridview to Show a navigation bar at underneath the gridview?
I have developed an asp.net control that inherits from the gridview and its called gridviewex... i need some page navigation stuff to render underneath it for some custom paging that i am implenting.. All going well but i can't seem to add new…

Martin
- 23,844
- 55
- 201
- 327
1
vote
1 answer
How can I render children tags in a custom server control?
I'm working on a custom ServerControl, I've created it like below :
[ParseChildren(true), PersistChildren(true)]
[ToolboxData("<{0}:Menu runat=\"server\">{0}:Menu>")]
public class Menu : WebControl
{
.....
…

Mohammad Dayyan
- 21,578
- 41
- 164
- 232
1
vote
1 answer
Problem in creating a ServerControl in ASP.NET , C#?
I'm working on a ServerControl (SuperFish Menu).
Below is my codes.
Menu.cs
[AspNetHostingPermission(SecurityAction.Demand, Level = AspNetHostingPermissionLevel.Minimal)]
[AspNetHostingPermission(SecurityAction.InheritanceDemand, Level =…

Mohammad Dayyan
- 21,578
- 41
- 164
- 232
1
vote
3 answers
Gridview in asp.net mvc2
I need to use ASP.Net gridview and do operations like sorting paging and selecting checkboxes in my asp.net mvc content view. I dont what to do. I've written something like this:

shraddha
- 11
- 2
- 3
1
vote
4 answers
Server Controls and View State
Ok time to show my complete lack of knowladge for all things web forms but here goes. I am extending the Panel control and OnPreRender sticking some additional controls inside of it (lets just say 1 textbox for simplicity). From here I am just…

Owen
- 6,992
- 7
- 44
- 77
1
vote
1 answer
How to create custom server control in asp.net 4.5
With new ASP.NET 4.5 in VS 2013 I do not see project template for creating server control. Does any one have idea how to create custom control in asp.net 4.5?

Jai
- 73
- 9
1
vote
1 answer
FxCop CA2000 Warning in UserControls
Running FxCop on a WebProject that contains a UserControl will result in a CA2000 Warning (Call System.IDisposable.Dispose on object) for every ServerControl (Label, TextBox,...) in that UserControl.
I understand why this would happen. Replacing the…

esjr
- 186
- 3
- 9
1
vote
1 answer
ASP.Net Templated Server Controls difference between UpdatePanel and other controls
Using the advise given on this post...
Creating an ASP.Net Templated Server control
... I was able to create a nice templated server control.
However, what I noticed is that on some templated controls such as the ASP.Net UpdatePanel you dont need to…

Remotec
- 10,304
- 25
- 105
- 147
1
vote
7 answers
The name 'control' does not exist in the current context
I am having trouble with an error on a site I am working on that I've inherited, upon grabbing the source from the repository and building, then clearing out a few reference errors, I am still getting over 1000 instances of this error:
The name…

Brian Denomey
- 166
- 1
- 2
- 13
1
vote
2 answers
Page containing Microsoft Chart Control returns Service Unavailable
I have a frustrating problem with an asp.net mvc view containing the Microsoft Chart control. When I request the view containing the control I get the following error.
Service Unavailable
HTTP Error 503. The service is
unavailable.
When I run…

mhinton
- 1,175
- 1
- 12
- 24