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
1
vote
1 answer

Wrapping GridView in a Panel linked to an AJAX Toolkit ResizableControlExtender

I am trying to create a resizable GridView wrapped up as a server control. I am using the ResizableControlExtender from the AJAX Control Kit, which as far as I know requires that the control that is to be resized must reside inside a panel the …
J M
  • 1,877
  • 2
  • 20
  • 32
1
vote
1 answer

Scope of JavaScript functions in server controls

I have decided to learn how to create server controls because of the problems I was having with user controls. I wanted to be able to create JavaScript functions for my user controls so I could call userControl1.clientSideFunction(); You cant…
1
vote
1 answer

Server control in server control ASP.NET

I'm trying to learn how to make server controls for asp.net. I use DevExpress which are 3rd party server controls. I'm trying to add a DevExpress button to my server control. public class Class1 : CompositeControl { private…
Ricky Casavecchia
  • 560
  • 3
  • 9
  • 28
1
vote
3 answers

How to use for loop to scan all controls in ASP .NET page?

foreach (Control ctrl in Page.Controls) { if (ctrl is TextBox) { if (((TextBox)(ctrl)).Text == "") { helpCalss.MessageBox("Please fill the empty fields", this); …
1
vote
1 answer

User Input and Server / User Controls

When creating an application page or web part, I will occasionally find that I have the same few drop down lists and labels in a pattern at multiple places around my page. Application Page _____________________ | lbl ddl lbl dll | | lbl ddl …
1
vote
2 answers

How to access a DetailsView's ItemTemplate's TextBox in code behind? ASP.Net C#

I have a DetailsView with 1 of its field converted to TemplateField to be able to manipulate the InsertItemTemplate that contains a TextBox (cf: code below). The problem is that I cannot access to that TextBox Properties in my code behind... and I…
Bro
  • 327
  • 6
  • 15
1
vote
1 answer

How to read content between tags of asp.net server control

I'm writing an asp.net server side control which has a few short parameters passed into it, but also the need to allow a large piece of custom HTML code to be supplied. The easiest way of doing so I thought was to allow to be specified between the…
Peter Bridger
  • 9,123
  • 14
  • 57
  • 89
1
vote
1 answer

Get Selected Text asp.net custom server control

I need to get the latest text set in the custom control by javascript. When i tried to get the selected text from server control, it is always returning the default text & not the modified text. How to retain the latest value set by the javascript…
0
votes
1 answer

Visual Studio (2008) intellisense and EditorBrowsable attribute

I am working on a C# project that involves ASP.NET custom server controls. I have several properties, methods etc that I hide from intellisense using the... [EditorBrowsable(EditorBrowsableState.Never)] ...attribute. I also have a web project set…
user110714
0
votes
2 answers

Creating nested ServerControl in asp.net?

I wanna create a server control like the following : <%@ Register Assembly="MdsAccordionMenu" Namespace="MdsAccordionMenu" TagPrefix="cc1" %>
Mohammad Dayyan
  • 21,578
  • 41
  • 164
  • 232
0
votes
1 answer

Setting a control's ID in code behind for use in a validation control

How can I use validation controls within server controls? The issue that I have is that by default if I do something like this: private TextBox _textbox; RequiredFieldValidator _validator; protected override void OnInit(object sender, EventArgs…
JoeS
  • 1,405
  • 17
  • 30
0
votes
2 answers

How to access server controls like a textbox from an external .js file using J-query?

I need to change the height of a textbox using J-query. I need to write this code in an external .js file. How do I access textbox height in J-query in the external .js file?
Mini
0
votes
1 answer

How do I Iterate over IEnumerable dataSource in CreateChildControls GridView

I can get the enumerator and the Current object but I don't know what the object contains so how do i iterate over a collection when you don't know the type and write out there values. Sample code would be great please protected override int…
ONYX
  • 5,679
  • 15
  • 83
  • 146
0
votes
2 answers

writing out the data for each row in custom gridview control and adding insert row at the bottom using IEnumerable

Im have a problem with writing out the data in my if statement where if(numRows > 0) the code is suppose to create an insert row at the bottom of the grid. It wrties out the insert row with textboxes but it doesn't display my data so i probably need…
ONYX
  • 5,679
  • 15
  • 83
  • 146
0
votes
2 answers

How do mimick html checkbox array with asp.net checkbox control?

I need to send an array of checkbox values to a form on submit. Right now I am using plain old html, so it looks something like this: The problem with the above is that it doesn't maintain viewstate on…
chobo
  • 31,561
  • 38
  • 123
  • 191