CodeVerge.Net Beta


   Explore    Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums

ASP.NET Web Hosting – 3 Months Free!



Zone: > NEWSGROUP > Asp.Net Forum > windows_hosting.hosting_open_forum Tags:
Item Type: NewsGroup Date Entered: 9/8/2005 6:58:30 AM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 1 Views: 26 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
2 Items, 1 Pages 1 |< << Go >> >|
manjushab
Asp.Net User
Server Control Enable Property9/8/2005 6:58:30 AM

0/0

Hi,

My control has Enabled property to enable or disable control.
in set method of property I want to find out whether control is disabled at cilent side using disabled property.



thanks.
JWilcox
Asp.Net User
Re: Server Control Enable Property9/10/2005 12:08:11 AM

0/0

Below is a quick aspx page that allows you to do this via JavaScript.  The possibilities are endless when it comes to ways to implement this.  In this particular example, I set the CheckBox1 to be disabled in the Page_Load event; the client side queries and returns the disabled property in a JavaScript alert box when you click the button.  Hopefully this helps get you started.

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<script runat="server"> protected void Page_Load(object sender, EventArgs e) {  CheckBox1.Enabled = false; } </script>

<html xmlns="http://www.w3.org/1999/xhtml" >

<head runat="server">

<title>Untitled Page</title>

<script type="text/javascript">

function seeIfEnabled()

{ var checkbox = document.getElementById('CheckBox1'); alert(checkbox.disabled); }

</script>

</head><body>

<form id="form1" runat="server">

<div><asp:CheckBox ID="CheckBox1" runat="server" Title="This is a check" /></div>

<input type="button" onclick="seeIfEnabled()" />

</form></body></html>


Jeff Wilcox [MSFT]
Test Lead - UIFX Silverlight

This posting is provided "AS IS" with no warranties, and confers no rights.
2 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
Professional ASP.NET 3.5 in C and VB: In C# and VB Authors: Bill Evjen, Scott Hanselman, Devin Rader, Pages: 1704, Published: 2008
Beginning ASP.NET 1.0 with Visual Basic.NET: With Visual Basic .NET Authors: Chris Goode, Rob Birdwell, John Kauffman, Christopher L. Miller, Neil Raybould, S. Srinivasa Sivakumar, Ollie Cornes, Matt Butler, Dave Sussman, Gary Johnson, Chris Ullman, Ajoy Krishnamoorthy, Juan T. Llibre, Pages: 816, Published: 2002
ASP.NET 2.0 for Dummies Authors: Bill Hatfield, Pages: 432, Published: 2005
Professional ASP.NET 2.0 Authors: Bill Evjen, Scott Hanselman, Farhan Muhammad, Srinivasa Sivakumar, Devin Rader, Pages: 1253, Published: 2005
Professional Web Parts and Custom Controls with ASP.NET 2.0 Authors: Peter Vogel, Pages: 449, Published: 2005
Developing and Implementing Web Applications with Visual C# .NET and Visual Studio .NET: Exam Cram 2, McAd Exam 70-315 Authors: Kirk Hausman, Amit Kalani, Priti Kalani, Ed Tittel, Pages: 555, Published: 2003
Beginning ASP.NET 1.1 with VB.NET 2003 Authors: Chris Ullman, John Kauffman, Chris Hart, Dave Sussman, Pages: 863, Published: 2004
Beginning ASP.NET 3.5: In C# and VB Authors: Imar Spaanjaars, Pages: 734, Published: 2008
Professional ASP.NET 2.0 Server Control and Component Development Authors: Shahram Khosravi, Pages: 1186, Published: 2006
Pro ASP. Net 3. 5 Server Controls and AJAX Components Authors: Rob Cameron, Dale Michalk, Pages: 740, Published: 2008

Web:
Visual Studio .NET Server Control Enable Property NET - Server Control Enable Property. Manjusha Basatwar posted at 08-Sep-05 02: 52. Hi, My control has Enabled property to enable or disable control. in set ...
WebControl.Enabled Property (System.Web.UI.WebControls) Enabled Property. Gets or sets a value indicating whether the Web server control is enabled. Namespace: System.Web.UI.WebControls. Assembly: System. ...
What Happens When You Set A Parent Control's Enabled Property (ASP ... What actually happens when you set a parent's Enabled property? My assumption was that it ... How to pass method name to custom server control in asp.net? ...
Anatomy of a Server Control (Part 2) Conclusions: By building an HtmlInputText Control, we have demonstrated how a Server Control maintains state, by mapping properties to ViewState, ...
InformIT: ASP.NET Custom Controls > Creating ViewState-Enabled ... Jan 26, 2009 ... Creating ViewState-Enabled Control Properties ...




Search This Site:










home server setup, server behind router issue

javascript onclick event

servergrid.com or 1and1.com?

problems with user controls

problems with using user control as navigation section

connection string as a control - urgent

trapping raised events in usercontrols with asp.net/vb.net

event firing problem

server control and setrendermethoddelegate

control designer vs. tree structure of child controls

anybody can recommend free hosting account?

lazy alternative to custom control - pls critique

writing a client function shared by similar validators

examples of using controlbuilder

re-writing the radiobuttonlist control to allow custom attributes

2 user controls, raise event from one to other

controlling an object in a web control from the page the web control is placed in

i know this is simple, but i can't get it to work....

datalist question?

is there a "chat" control?

custom server control that loads usercontrols - problem

click event handling: what should be such as easy task........

how to make a linkbutton placed inside a datagrid fire

visual studio eating inner controls when changing properties

reloading user control using onprerender method

persisting collection item in a server control

custom dataadapter component

ipostbackdatahandler example code not working

adding design time support for customparse2 example

composite control bound to data

  Privacy | Contact Us
All Times Are GMT