Questions tagged [web-controls]

Web controls are classes that allow you to create Web server controls on a Web page

Web controls are classes that allow you to create Web server controls on a Web page. Web server controls run on the server and include form controls such as buttons and text boxes. They also include special-purpose controls such as a calendar. Because Web server controls run on the server, you can programmatically control these elements. Although Web server controls are rendered as HTML, their object model does not necessarily reflect HTML syntax.

586 questions
4
votes
1 answer

How to prevent Just-In-Time Debugger showing when script error occurs in WebBrowser control

I use a WebBrowser control in my Winforms application. When I navigate to a Url that causes a JavaScript exception the Just-In-Time (JIT) debugger window shows up asking if you want to debug this exception: An Unhandled exception ('Object …
Patrick Klug
  • 14,056
  • 13
  • 71
  • 118
4
votes
1 answer

ASP.net control Postback Problem (Can't read the value the user entered!)

I've written a custom widget to allow a user to select a location from a database of locations. This is my first ASP.net custom control. It seemed like everything was working fine, but now there's a problem. My control implements the…
Vivian River
  • 31,198
  • 62
  • 198
  • 313
4
votes
4 answers

How to abstract common snippets of markup with ASP.NET MVC

I have a lot of content-heavy views in my ASP.NET MVC 2 site. These contain several re-occurring HTML patterns. When using ASP.NET Webforms, a class derived from WebControl could encapsulate these patterns. I'd like some pointers on the correct…
Joseph Tanenbaum
  • 2,211
  • 15
  • 30
4
votes
3 answers

Sharing value from child to parent control

I am relatively new to this, but here is my problem. In asp.net, I have a parent and a child control. Within the child control I have a dropdown list. Based on dropdown list's selected value I would like to toggle Visibility of Panel in parent…
Ashar Syed
  • 1,236
  • 6
  • 16
  • 28
4
votes
3 answers

Trouble with FindControl and dynamicly created controls

Example code: var div = new HtmlGenericControl("div"); div.Controls.Add(new Literal() { ID = "litSomeLit" }); var lit = (Literal)div.FindControl("litSomeLit"); Assert.IsNotNull(lit); This code fails the assert, because lit is null. …
Fishtoaster
  • 1,809
  • 2
  • 20
  • 36
4
votes
2 answers

Awesomium webcontrol

So I've been trying to use something other than IE for my webcontrol in a side-project of mine (C#, WPF project type) and I was looking around for alternatives and have tried in the past but failed to implement them. I decided to try again and…
Darkshadow
  • 103
  • 1
  • 9
4
votes
1 answer

RepeatDirection Property for CheckedListBox C#

so I'm very confused here. I want to make my multilined CheckedListBox to be sorted horizontally. I've done some research and it is all leading to the RepeatDirection property. Example in the MSDN But I don't have a web page and I don't know any…
4
votes
2 answers

How can I include additional markup within a 'Content' inner property of an ASP.Net WebControl?

I've searched the site and I cannot find a solution for my problem, so apologies if it's already been answered (I'm sure someone must have asked this before). I have written a jQuery Popup window that I've packaged up as a WebControl and…
djdd87
  • 67,346
  • 27
  • 156
  • 195
4
votes
4 answers

When's the absolute latest you can call Page.ClientScript.RegisterClientScriptBlock?

I need to output some JavaScript in a WebControl based on some processing and some properties that the consumer can set, doing it on the load of the page will be to early. When is the latest I can call RegisterClientScriptBlock and still have it…
Kieron
  • 26,748
  • 16
  • 78
  • 122
4
votes
12 answers

The name 'GridView1' does not exist in the current context

I have two files named as TimeSheet.aspx.cs and TimSheet.aspx ,code of the file are given below for your reference. when i build the application im getting error "The name 'GridView1' does not exist in the current context" even thought i have a…
sameer
  • 1,635
  • 3
  • 23
  • 35
4
votes
3 answers

How to get the set/real value of the Visible property in Asp.Net

The Get of the Visible property of a control recursively looks up the tree to indicate if the control will be rendered or not. I need a way to see what the "local" visible value of a control is regardless of what its parent controls are set to. i.e.…
Robin Day
  • 100,552
  • 23
  • 116
  • 167
4
votes
1 answer

Awesomium WebControl Hang

I have a tabcontrol and in the tabcontrol I have two tabitems, and both of them contain an awesomium Webcontrol. However after some random time the Webcontrols don't display anything. When I try to call a method on them I get an…
webmaster442
  • 231
  • 1
  • 3
  • 9
4
votes
2 answers

What’s wrong with use of “Using” block on Webcontrols?

I have following code that uses “using” block on TableHeaderCell, LiteralControl , HyperLink and GridViewRow (try..finally). The code is working as indented. Is there any issue/pitfall in disposing the controls with “using” block as shown below? If…
LCJ
  • 22,196
  • 67
  • 260
  • 418
4
votes
1 answer

Get number of items in repeater during OnItemDataBound

I'm trying to get the number of items in a repeater whilst handling the OnItemDataBound event. What I'm trying to achieve it quite simple; I'm trying to hide a certain label on the last item within a repeater. Currently I'm hooking into the…
Richard
  • 8,110
  • 3
  • 36
  • 59
3
votes
1 answer

Partial caching of custom WebControls

I need to cache the generated content of custom WebControls. Since build up of control collection hierarchy is very expensive, simple caching of database results is not sufficient. Caching the whole page is not feasible, because there are other…
Dresel
  • 2,375
  • 1
  • 28
  • 44
1 2
3
39 40