Questions tagged [servercontrols]

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).

213 questions
0
votes
1 answer

How to remove duplicate code across Custom Control Classes

I have 2 custom server control classes. One inherits from TextBox and the other inherits from Label. Both classes contain quite a lot of common code (various properties and attribute rendering logic), but the classes do contain some distinct code as…
Matt
  • 195
  • 1
  • 4
  • 12
0
votes
1 answer

jquery datePicker fire textchange event

i create server control with jquery datepicker , which i initial in my render method. in the textbox i set autopostback and add custom event to fire on textchanged this is the server side : protected override void CreateChildControls() { …
roy.d
  • 983
  • 2
  • 14
  • 32
0
votes
2 answers

Are there any JSP server controls?

I was wondering if in Spring MVC I can add server controls in my jsp pages, like I do in ASP.Net with for example. All the examples I see on the Internet use javascript controls...
Pacane
  • 16,528
  • 15
  • 52
  • 88
0
votes
4 answers

How to access asp:Image from Javascript?

I got an asp:Image in my server-markup like this: Now, I want to find this img in my javascript, but seem to run into the problem of ASP.Net obfuscating my names. The client-markup will look something like…
cwap
  • 10,511
  • 8
  • 44
  • 59
0
votes
0 answers

ASP.NET Rich Text Control that supports "replace" fields

I am looking at a ASP.NET Rich Text Control which has to support "replace" fields. Basically the user should be able to add special fields to the text from a predefined list of replace fields (example: {CustomerName}, {Company}, etc). What are…
BlueChameleon
  • 916
  • 1
  • 8
  • 35
0
votes
0 answers

Forcing override on a server control method

I'm building a custom asp.net server control and I want to fire an OnSave method and pass on a parameter to the page implementing the control (best analogy would be the RenderContents method). The idea is to generate an XML string containing the…
pnduke
  • 183
  • 3
  • 14
0
votes
3 answers

Get child controls on server control using javascript ASP.NET

I've create a basic composite server control that contains a button. I would like to be able to get to the child controls using javascript for example: var…
0
votes
1 answer

Render an asp:Menu directly to an HtmlWriter

I'm in the process of adding some MVC pages to an already existing WebForms project. I want to continue with as few changes as possible to the WebForms master page / helper methods. The WebForms project was using an asp:Menu to build the menu…
just.another.programmer
  • 7,909
  • 8
  • 42
  • 83
0
votes
2 answers

Extending .net control: How to prevent HTML atttribute from rendering

I've written a server control that extends the standard .net Gridview control. However, by default the standard gridview control adds a border="0" attribute to the html markup that it produces, and I want to prevent this attribute from being…
paulH
  • 1,030
  • 14
  • 39
0
votes
2 answers

Using JQuery Modal Diaglog to fire a Server Side Control

OK so I have a jquery modal dialog. It accepts an input and then has an ok and and cancel button. Cancel works fine by simply closing the dialog. The ok button fires the OnClientClick when I really want it to fire the OnClick method so I can go into…
auwall12688
  • 359
  • 3
  • 10
  • 22
0
votes
1 answer

Unable to write to a script tag in asp.net

I have a script that I want only to load if a certain condition was met, so I figured I should do this: //Head tag //Rest of the page .cs (Page_Load event) if(someCondition) { …
rdelfin
  • 750
  • 2
  • 10
  • 30
0
votes
1 answer

Running javascript as an ASP server control is rendered

What is the preferred approach for running JavaScript right as an ASP server control is rendered on the page. The documentation is a bit confusing/obtuse.
Matt
  • 24,106
  • 61
  • 180
  • 291
0
votes
1 answer

Is it possible to convert a simple radtextbox to radnumeric-textbox

Is it possible to convert a simple radtextbox to radnumeric-textbox from codebehind or javascript? I have a dropdown list where i can decide whether the text box should allow only numbers or any character.
Mridul Raj
  • 931
  • 3
  • 17
  • 42
0
votes
1 answer

Datasource for dropdown overridding static value?

I am using a drop down server control that is databound to a data source, but I would also like to have a default value ("Select a program") that is hard-coded as the first item of the list. Code-behind /// /// Page Load ///…
chobo
  • 29,453
  • 35
  • 118
  • 182
0
votes
1 answer

How to prevent HtmlGenericControl from encoding?

I'm adding a script reference to a page header using a HtmlGenericControl. The problem is that it encodes the src parameters. So "&mkt=fr-FR" turns out as "&mkt=fr-FR" and doesn't get the correct script. var scriptTag = new…
NullReference
  • 4,134
  • 10
  • 49
  • 85
1 2 3
14
15