.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

How to Check Asp.net Control Is Enabled or Not

Posted By:      Posted Date: September 24, 2010    Points: 0   Category :ASP.Net


I want to check whether a control is enabled or not.

View Complete Post

More Related Resource Links

Question about Workflow in Document Library with version control and check-in/out enabled



I use Sharepoint Foundation 2010 and have a workflow to set some metadata in a document with version control and check-in/check-out enabled (approval content is not enabled because anyone in the team can be a possible editor of the document).

My metadata is:

- a generated doc id with text+id (example P&D_1)

- a calculated status based in version: minor version = "on development" and major-version="published/approved"

I defined two workflows:

1) is called when item is created to define id and status.

2) is called when item is updated and status is re-calculated if version is major. (It is called in every item change, not only when user wants to publish a major version, because this option doesn't appear in SPD)

I noticed that sharepoint workflow must do a check-out to be able to update metadata, and because of this the version number is incremented. When version is minor, I don't care, but when version is major I have a problem, because just after publishing the version 1.0, the workflow changes metadata and the version to 1.1. and 1.1 means that the document is not approved anymore...


a) Isn't it possible to do the workflow to check-in and override the last/current version to not generate a new version??

b) Or is it possible to stop versi

check box control


Hi ,

I have a three check box in my web form ,i need to choose only one check box, if i choose one check box

another 2 check box automatically unchecked

can i use jquery for check box

How to check if a Control partially or completely obscured by other windows

In  http://social.msdn.microsoft.com/Forums/en-US/netfxbcl/thread/78289886-f3c1-405b-aaa1-722a23690245 is described how to test if a Window is obscured by other windows. Is there a way to do this wit a single control ?  Using the  GetOverlappedIntersection from the example dosent work. ? I'am not very good in Win32... but Controls implement IWin32Window also - Wht is the difference to Forms ? Thank you

how to check javascript is enabled

hey guys, i have a wen form that has some javascript. i want to test if a user has javascript enabled or not. if they don't i should alert them with a message so they are aware they need javascript to use the form. i had a look at this example below but this will only work is javascript is enabled! any suggestions/links? <script language="JavaScript"> <!-- function cc() { if (document.cookie == "") { alert("COOKIES need to be enabled!"); document.Form1.cookieexists.value ="false" } else { document.Form1.cookieexists.value ="true" } } document.cookie = 'killme' + escape('nothing') </script>

Ajax enabled user control

Hello all, I've just started to play around with MVC 2. The purpose of it is to evaluate the effort for our team to switch from ASP.net Forms to MVC. The start was quite simple. At the moment the MVC pattern and its implementation (conventions, etc.) is understood it seems to be simpler to get an application running in MVC then in Forms.   In one of our upcoming projects we have to build an Ajax enabled UI. We already work with the jQuery so it will be the library of our choice. The controls we have to build are more or less complex and most of them are based on a domain entity for which we have a class in our domain model.   Now I am wondering what might be the best way to build our ajax enabled user controls.   I have read a few tutorials and blogs about two potential options:   1. Extension methods for HtmlHelper 2. Partial views and Html.RenderPartial   Option 1 is interesting because we pass typed parameters to a method and the output is a HTML string.   Option 2 is interesting because we have way more possibilities to hook into behaviours of control / page rendering.   It would be interesting for me if you could share best practices.   Thanks in advance   nofxmojo

SQL Server 2005 - Check if Trace Flag is enabled?


Hi all,

never encountered trace flags before, but due to a problem in one of our applications I was asked if we activated a hotfix by enabling two trace flags.

Is there a possibility to check, if the trace flags are enabled?

I don't have the permission to execute anything on our SQL Server so I cannot run the DBCC TRACEON command.

Other question: by enabling a trace flag is there any risk to it? We have a productive environment and at the end of the month there are lots of reports running, so I don't want to do any changes to the system that might cause a problem.

Thanks for your suggestions


Is there any free spell check control for asp.net


wondering whether there is any free spell check control or way to check the spell and give suggestions on test box control?? for asp.net page??

thanks a lot in advance....

How to retrieve server control value of a clientside enabled control


Ho all, time for some expertise. I have a datalist which contains a radiobutton in the itemtemplate. This radiobutton is disabled (set enabled to false) by default. On the html output I have a checkbox, which, when ticked, enables the radiobuttons through javascript. This is all working fine. The rb's are enabled and I can check them.

However when the page is posted back. The checked property is always false.

Can someone tell me how I can solve this? 

I use the code below the retrieve the value of this rb:

  Private Function AntwoordenId() As List(Of String)
        Dim rb As RadioButton
        Dim id As New List(Of String)

        For Each item As DataListItem In rptScore.Items
            rb = item.FindControl("rbnScore")
            If Not rb Is Nothing And Not cbxNVT.Checked Then
                If rb.Checked Then
                End If
            End If
        Return id
    End Function

This code is working fine when the initial state of the radiobuttons set to enabled server side.

Resetting the default value of a control when a check box is returned to False (unchecked)


Let me start by saying I’m new at programming InfoPath and I value the advice I have found in this forum. Thank you...

 Here’s my situation: I have an InfoPath 2007 form that populates a SharePoint list once the form is submitted. On the form I have various textboxes that are conditionally formatted to remain hidden until an associated checkbox is checked (value of True).  All is good so far. 

The situation I have is if the user decides after populating a textbox they really didn’t need to fill in that textbox and the checkbox is unchecked (value of False), the textbox is hidden once again but the information remains in the textbox.  Thus, when the user submits the form the unneeded information is submitted as well.  

I would think returning a textbox control to its default value could be accomplished wi

Using a CompareValidator to check input is a valid date

The CompareValidator can do more than just compare two controls. You can also compare it against several of the main .net data types such as Date, Integer, Double and Currency.

To do this you would set Operator="DataTypeCheck" and instead of setting the ControlToCompare or ValueToCompare attributes as you normally would you use the Type="Date" (or any of the data types I have listed above).

Adding Dynamic Rows in ASP.NET GridView Control with TextBoxes and with Delete functionality

In my previous examples, I have demonstrated on how to add dynamic rows in GridView control with TextBoxes and how to save the values into the database. Now, seems that most of the developers are asking if how to add a delete functionality with it. So in this example, I'm going to show on how to delete a certain row in the dynamic GridView with TextBoxes.

Accessing the different controls inside a GridView control

how we can access a particular control which resides inside a GridView control. In this article I will show you how you can access different controls inside a GridView control. We will see how we can access a TextBox control, a DropDownList control and a ListBox control. If you are working with ASP.NET 1.X then you might want to check out my article Accessing Different Controls Inside a DataGrid.

In-Depth look at the GridView Control

In the last article we looked at few of the new controls available in Asp.net 2.0. We also talked about Grid View Control which has replaced the Asp.net 1.1 DataGrid control for good. In this article we will examine more features of the Grid View control. In this article we will see some of the common operations that can be performed using the GridView control. Apart from these operations there are many more functions that can be performed on the control and which we will see in the later articles

Check All with JQuery and a Asp.Net GridView

Display a Grid on the screen with a checkbox in each row. At the bottom of the page have "Check All" button.

Typically if I need to do anything interesting I use a template column. So my GridView will look like the one below (most other columns removed for readability). The only interesting point to note is the CssClass="ApprovalCheckBox" in the CheckBox ItemTemplate.

ASP.NET repeater control - databind with style

even used the inline editing features, which I at the time thought was the coolest way possible to write ASP.NET code ( I managed to write code to hide all other rows and only show the current one - the row being edited). With a nice looking EditTemplate it looked indeed very slick but it really turned into giant and hard to manage code behind files.

Creating Paging for a Repeater Control

A common question is "How do I implement paging within a Repeater?" Although the beauty of the Repeater control is its flexibility, you're on your own for building most functions. ASP.NET 2.0 has included some new controls that provide paging, as does the DataGrid in ASP.NET 1.1. However, this tip shows you how to roll your own paging for a simple data viewer.

Using TemplateFields in the GridView Control

The GridView is composed of a set of fields that indicate what properties from the DataSource are to be included in the rendered output along with how the data will be displayed. The simplest field type is the BoundField, which displays a data value as text. Other field types display the data using alternate HTML elements. The CheckBoxField, for example, renders as a checkbox whose checked state depends on the value of a specified data field; the ImageField renders an image whose image source is based upon a specified data field. Hyperlinks and buttons whose state depends on an underlying data field value can be rendered using the HyperLinkField and ButtonField field types.
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend