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


Top 5 Contributors of the Month
Easy Web
Imran Ghani
Post New Web Links

How to set the checkbox state "checked or not checked" from a database

Posted By:      Posted Date: August 26, 2010    Points: 0   Category :ASP.Net
 

hey In the code I have here, I need to set the checkbox state from a database but I dont know the properties:

while (l_objRead.Read())
{
                         //txtUserName.Text = l_objRead["UserName"].ToString().Trim();
                         txtWerknemerNaam.Text = l_objRead["Naam"].ToString().Trim();
problem here => cbAktief.CheckState = l_objRead["Aktief"];
}



don't know how to set the state, help pleaz :)




View Complete Post


More Related Resource Links

Filling state dropdownlist according to country dropdownlist from database

  
Hello,I've been looking for an answer to this problem of mine but not yet able to get any solution.Please help me out. I'm having 2 dropdownlists, one for country and another for state.I want the states to be filled according to the country selected from the country ddl. I'm having:  Two dropdownlist controls as-ddlCountry and ddlState Two database tables as-Country and State Country table has fields named- C_ID(pk) and Country State table fields are-S_ID(pk), State, C_ID During page load, I'm able to bind the ddlCountry to the "Country" table in  databaseHence I could bind ddlState too  But I'm getting confused, how to bind the ddlState control so that it will show state as per country selected. I don't want to use ajax Please help me out. Thanks and Regards, Zinnia

How to maintain checkbox state in paging

  
Hi GuysI am using dot net 3.5.I have a grid in which there are text box and check box as template column.But when I move from one page to another the value of checked check box is lost.How to maintain the value through all the pages in grid.RegardsUnmesh 

writing threestate checkbox value in access database...........

  

Hello everybody,

i have a grid with three state checkbox in it. I want to save the checkbox value in access table and then bind again when necessary, can any one tell me how can i do it??

for two state checkbox, i can use yes/no type field of the access table to save the value of checkbox and then i can bind properly but how can i store three state checkbox value in the database and what should be the type of the field??


writing threestate checkbox value in access database...........

  

Hello everybody,

i have a grid with three state checkbox in it. I want to save the checkbox value in access table and then bind again when necessary, can any one tell me how can i do it??

for two state checkbox, i can use yes/no type field of the access table to save the value of checkbox and then i can bind properly but how can i store three state checkbox value in the database and what should be the type of the field??


Rule "SQL Server Database Services feature state" failed

  

I'm trying to do a SQL 2008 cluster installation.
I installed one node and now I'm trying to add a failover cluster node.

in the "add Node Rules" I get following message:

---------------------------
Rule Check Result
---------------------------
Rule "SQL Server Database Services feature state" failed.

The SQL Server Database Services feature failed when it was initially installed. The feature must be removed before the current scenario can proceed.
---------------------------
OK  
---------------------------


Can anyone help me?


Three-state checkbox in TreeView

  

 

Not so sure if this is a right forum for my question...

I currently develop a Windows application using C# + .NET 2.0 - 3.5 with VS2008.  I want to have a tree view with checkboxes that have three states: checked, unchecked, and gray-checked.  Very much like the VS installation program.

 

But the .Net tree-view control has only 2 state checkbox: checked/unchecked.  How can I make the treeview has the 3-state checkbox?  Can someone give me some sample code?

 

thanks in advance

 

 


Change database state to / from Standby / Read-Only to Normal

  

I've got log shipping running as part of my DR strategy and the recovery database shows up on the DR server in Standby / Read-Only mode.  In the case of distaster how would I change the database from Standby mode into Normal mode?

The database is almost 10GBs and I'd like to test out a recovery while being able to then turn the database back into recovery mode after the test.  Is that possible?

Thanks

Steve

 


Steve Berg

Follow Steve on Twitter


Multiple database support with Entity Framework

  
One of the features introduced in Entity Framework is being database independent. Which mean each database provider can support Entity Framework by implementing its provider.

This feature allows you build applications independent from the underplaying database provider. In this post I'm going to show how to build an application that support multiple databases using same conceptual model made by Entity Framework.

Export Visio Database Table Names to Excel

  
If you use the Enterprise Architect edition of Microsoft Visio for data modeling regularly, then there is a good chance that at some point you've wanted to export just the table names into Excel. You might want to do this to map logical ERD entities to physical data model tables, track project status by entity, or track overlap between database versions.

AJAX GridView Checkbox Select All in ASP.Net

  
In the previous article GridView Select Multiple Rows you learnt the multiple row selection in GridView control. Here you will get the C# code sample to select all the gridview rows using single checkbox server control. You can highlight the selected rows with different color and Font state Bold. If you want to use the selection values on different ASP.Net

Truly Understanding View State

  
This article provides a detailed understanding of the ViewState.

jQuery: Highlight Gridview Rows with Checkbox

  
Im learning and experimenting with jQuery and ASP.NET. Below is a simple solution I created to highlight rows in a gridview by clicking on a checkbox next to the row.

Gridview setup:

MS SQL Server: Disconnect Users From Database - Kill User Session

  
If you ever wanted to restore your database from a SQL backup file (.bak), but there are still users connected to your database, the backup operation will fail causing the error: Exclusive access could not be obtained because the database is in use.

jQuery: Highlight Gridview Rows with Checkbox

  
Im learning and experimenting with jQuery and ASP.NET. Below is a simple solution I created to highlight rows in a gridview by clicking on a checkbox next to the row.

Publishing SQL Server Database using Publishing Wizard : Tips & Tricks

  
We can use SQL Server Publishing Wizard to deploy our local Database to remote hosting server/production server.This feature is available in SQL Server 2008/VWD 2008.

Below is the complete step by step guide of this process.

Adding Rows in GridView without using a Database

  
This article describes on how to add rows in GridView without using a database. Basically the GridView will be populated with data based on the values entered in the TextBox on Button Click and retain the GridView data on post back.

Adding Multiple Columns and Rows in GridView without using a Database

  
This article describes on how to add multiple columns and rows in GridView without using a database. Basically the GridView will be populated with data based on the values entered in each TextBoxes on Button Click and retain the GridView data on post back.
Categories: 
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