Jonas Bush

Blog.blog.blog.blog
posts - 16, comments - 161, trackbacks - 17

My Links

News

Archives

Post Categories

Image Galleries

General

ASP.Net

Posts specific to ASP.Net.
Triggering a validator through javscript
In this post, I talked about enabling or disabling a validator client-side. Someone had commented asking how to change the status of a control from valid to invalid. The following javascript works at least for required field validators, I haven't tested it with anything else (but I imagine it should work just fine). Again, this is 2.0, I haven't tested this in 1.1: var myValidator = document.getElementById('&l... For a required field validator...
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

Posted On Monday, January 29, 2007 3:45 PM | Feedback (1) | Filed Under [ ASP.Net ]

Using Atlas to act as a check on javascript calls
One of the things I've been working on is how to use Atlas web services to verify actions on the server. So the client requests to perform a particular action on the server, and if they don't have access to perform that action or the action fails (because a database is down, or something along those lines), I don't want the method on the client to continue executing. The problem with that is that Atlas web service calls are asynchronous by nature (explained here and here). So I can't say something...
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

Posted On Wednesday, August 16, 2006 2:48 PM | Feedback (0) | Filed Under [ ASP.Net ]

Disabling an ASP.Net Validator through Javascript
If you ever find yourself needing to selectively disable an asp.net validator through javascript, you can do the following (in 2.0, not sure if this exists in 1.x): function doSomething(){ var myVal = document.getElementById('my... ValidatorEnable(myVal, false); } Quick and easy! Sadly, not as easy to find through Google, so hopefully this post will help that. :)...
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

Posted On Friday, August 11, 2006 8:57 AM | Feedback (84) | Filed Under [ ASP.Net ]

Enabling/disabling asp.net checkboxes through javascript
The problem: You want to have a web form with multiple checkboxes, and have some of them be enabled or disabled depending on whether a certain checkbox is checked (or radio button selected, or what have you). At first glance, this seems fairly simple; you can just do: <%=myCheckBox.ClientID%&... = false; in javascript. The problem comes when you, on the server side, disable the checkbox by default. (NB: this pertains to ASP.Net 2.0, it may work differently in 1.x). The problem is that...
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

Posted On Thursday, July 27, 2006 10:10 PM | Feedback (72) | Filed Under [ ASP.Net ]

Less than useful helpfiles, part 1
In the helps for HtmlInputControl.Name (for .NET 2.0): Gets or sets the unique identifier name for the HtmlInputControl control. Later on, in that same help file: In this implementation, the get accessor returns the value of the Control.UniqueID property. However, the set accessor does not assign a value to this property. So then why say that it sets the property, if it doesn't actually set the property...
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

Posted On Tuesday, May 09, 2006 1:37 PM | Feedback (1) | Filed Under [ ASP.Net ]

Repeaters, Checkboxes and UpdatePanels, Oh My!
I was working on some sample stuff that I'll be posting later and ran into a problem. I had 2 different update panels; inside one was just a div, inside the other one was a repeater. Inside the repeater I had a bunch of checkboxes, and when I checked/unchecked them, I needed the first update panel to be updated. This posed a couple of problems: A checkbox doesn't have a CommandName property, and can't be used to trigger a Repeater's ItemCommand event This I got around by declaring the event handler...
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

Posted On Monday, May 08, 2006 2:08 PM | Feedback (3) | Filed Under [ ASP.Net ]

Powered by: