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
0
votes
4 answers
is it strange to generate controls into placeholders to avoid the "ugly" long Control ClientID's?
More and more I dislike this long ID's by server controls...
But the other method to generate it in codebehind I think is not the sense of the easy thing of asp.net, is it?
So would you prefer that method by yourself? I'm going to create medium and…

Marc
- 2,659
- 3
- 34
- 41
0
votes
2 answers
Set default properties for ASP.Net controls
How would I set the default properties of server controls that I'll always use?
For example I have combos all over my pages which almost always look the same in the mark up text (e.g. CSS CLasses for PopUp, TextBox, Button, etc.)
I thought of…

Matthias Max
- 595
- 1
- 7
- 20
0
votes
0 answers
Apply style to child in server control
I have a server control that I've created that allows custom content inside of it. This custom content all resides inside a div, which I call contentDiv. What I would like to do is pass any style attributes placed on the server control to the…

mrK
- 2,208
- 4
- 32
- 46
0
votes
1 answer
How to access Dynamically loaded server control of Master Page in content page?
I have created Master page and from content page, loaded some server controls to Master Page.
Control ctrl = Page.ParseControl(result);
ContentPlaceHolder cph = (ContentPlaceHolder)this.Page.Master.FindControl("ContentPlaceHolder1");
…

Tom Cruise
- 1,395
- 11
- 30
- 58
0
votes
1 answer
A list of all asp controls for .net 4
I'm looking for a text list of all the ASP controls for .NET, ideally with accessible attributes.
Something like:
asp:Button - runat, visible, text, enabled, onclick
asp:Label - runat, visible, text, enabled, onclick
etc.
My intent is to use them…

Jono
- 3,949
- 4
- 28
- 48
0
votes
1 answer
Creating asp.net server control template
I'm trying to create to templates for my server control(caption template and content template).
<%# Eval("MyCaption") %>
…

Gab
- 471
- 3
- 10
- 25
0
votes
1 answer
Prevent clearing of child controls in composite control
I have a custom server control that the markup looks like such:
…

mrK
- 2,208
- 4
- 32
- 46
0
votes
0 answers
DropDownList in fixed
I have some dropdownlists in a particular screen and whenever I get the value of the same, always comes the first value. What do I do to solve this, the dropdownlist in other pages work correctly and can select the value of them, this can not.
I'm…

Elton da Costa
- 1,279
- 16
- 27
0
votes
1 answer
Set values always customized to gridview in asp.net c#
need to fill a gridview via code (C#) and want to know how I define the values for components declared inside of it, like labels, buttons and linkbuttons.
Below is an example of a component that would fill and I'm not getting:

Elton da Costa
- 1,279
- 16
- 27
0
votes
1 answer
using control states in server control
I have a server control that I am trying to get to save properties as control states but for some reason the properties are not persisting across partial postbacks.
The psuedo code is as follows:
Public Class FileUpload
Inherits ScriptControl
…

jason
- 3,821
- 10
- 63
- 120
0
votes
2 answers
Server control/data access best practice?
Is it better to access data from within the web parent app and pass the necessary data to the control and back via properties, or pass a reference or url pointer (of webservice) to control and let it access the data for the fields it encompasses…

suedeuno
- 395
- 1
- 4
- 12
0
votes
0 answers
How to create ServerControl using JavaScript
I want to create dynamic Server controls(like text box and hidden field) in my project so that i can fetch their value at server side using JavaScript so that processing does not get slow so I want to your suggestion that how can I perform this,
Or…

Arjun Sharma
- 595
- 2
- 9
- 23
0
votes
1 answer
How can i create a ModalPopupExtender control dynamically from a server control?
I have a composite server control that does quiet a number of things; one of which is to display a ModalPopup OnClick of a dynamically generated HtmlAnchor control.
I need to create this ModalPopupExtender control dynamically in my server control…

Orson
- 14,981
- 11
- 56
- 70
0
votes
0 answers
asp.net multi checkboxlist
I have an asp.net multicheckbox list with autopostback = false. If I check on any item it will affect the first item on the list. FI if I check on the third item, the first one will get checked as well, if then I check on the next item, the first…

eloycm
- 404
- 2
- 12
0
votes
1 answer
Storing objects in controls
I have been confused about this for a while, so I thought I will ask here. I have noticed that a lot of controls can store objects in winforms but not necessarily in web forms. For example, a checkedListBox in winforms can save objects while…

Ratan
- 863
- 5
- 12
- 28