In this tutorial I will show you how to enable a button on checking of a check box without using any update panel. This is i found when I wanted to enable a register button in an registration form using update panel and the Css of the button was not working when it is disable.
So lets create a new project. And add a new check box and a button into a new web form.
.csharpcode, .csharpcode...
Friday, May 30, 2014
Add Custom Controls in your ASP.NET Project
This article is about to discuss about the adding custom controls in ASP.NET project. So what is a Custom control. Its a server control add you can create and add to any other project you want like C K Editor, AJAX Control Toolkit, Telerik, Dev Express etc.
So, to do this you need to create...
Wednesday, May 28, 2014
Create an invisible password in Windows Application using C#
To day in this tutorial I will show you how to make an textbox in password mode without changing its TextMode property to Password.
I make this more simple by explaining the output of this program,
As an output there will be a textbox for inputing your password. But it will not show any charecter that will be written in the textbox, ie. invisible.
Create a new project and add a new form with a...
Thursday, May 22, 2014
Create random password in ASP.NET C#
In this tutorial I will show you how to make a random generate password in C#. You can apply it either in web application(ASP.NET) or in windows application.
Create a new project and add a web form or a win form as per your project. And then add a button. On the Button_Click() write the following code.
.csharpcode, .csharpcode pre
{
font-size: small;
color: black;
font-family: Consolas, "Courier...
Wednesday, May 21, 2014
How to show alert box within UpdatePanel
Showing javascript alert box within update panel is some time very much problematic.
So here is the right way to show that.
Within a button click or any event coming from update panel write the following code to show the alert box
.csharpcode, .csharpcode pre
{
font-size: small;
color: black;
font-family: Consolas, "Courier New", Courier, Monospace;
background-color: #ffffff;
/*white-space:...
Get Identity after inserting into database in Ms. SQL Server
Suppose we have a table named tblUser with coloumn name
Id int auto increment primary key
Name nvarchar(255)
Email nvarchhar(255)
Now after inserting a value into tblUser an Id will automatic generate as Id. Now how will you retrieve that Id. Very simple.
After inserting code place the bellow code
SELECT @@IDENTITY
This one will return you the Id of the inserted ro...
How to bind a DataGridView in a Windows project C#

Here I will show you how to bind a DataGridView in a windows application with a DataSet and SQLDataSource.
First create a new windows project and add a new form. After that select a DataGridView and drag and drop into the form.
Now choose a new DataSource against the DataGridView.
Select...
Tuesday, May 20, 2014
Use Google Captcha in your ASP.NET Project in C#

Using captcha in your site making your site much better secure against hackers and their scripts. So in this article I will show you how to use Google recaptcha in your asp.net project.
First download the ReCaptcha.dll and add as a reference in your project. You can download this from here. Before...
Saturday, May 17, 2014
How to convert a string into array in c#
Many times its required to convert a string into an array. In this tutorial I will show how to convert a string into an array.
First take a textbox names TextBox1 and a button to convert it into array. Also take a label to show the result.
On the button click event write the following code..
.csharpcode, .csharpcode pre
{
font-size: small;
color: black;
font-family: Consolas, "Courier New",...
Thursday, May 15, 2014
Insert Data using WCF Into Database in ASP.NET C#
In this article I will show you how to insert data into database using Windows Communication Foundation(W.C.F.).
For that first you need to create a WCF Service Application.
Now to insert data into database you need to get help of two things.
OperationContract (Add services...
Tuesday, May 13, 2014
Loading a .TXT file into a Label using C# in ASP.NET
Some times its very important to get and show data from an external file like .txt file. So in this example I will show you how to get the data of a .txt file in a label or a text box in ASP.NET using C#.
Create a new project and add a web form. In the App_Data folder create a txt file and put some data into it. We will get the value of from that txt file.
On the page load event of your web form...
Get HTML Drop Down List value in code behind C#
Few days ago I stuck into a problem , I need to get the value of from a HTML drop down list in my c# code behind page. So I started searching and found the solution. Very simple solution indeed. Just a single line code to end the problem.
Suppose the drop down list code is
.csharpcode, .csharpcode pre
{
font-size: small;
color: black;
font-family: Consolas, "Courier New", Courier, Monospace;
...
Monday, May 5, 2014
Add User Control Tool dynamically in ASP.NET C#
In previous post I have wrote about UserControlTool. In this post I will show how to add the UserControlTool dynamically in an aspx page.
First add the folder as a namespace into the .CS page.
Suppose project name is "asx_add" and in the folder "tool" all the user control tools are presented.
So add the namespace.
using asx_add.tools;
Now add the line bellow to add the control tool.
private...
Subscribe to:
Posts (Atom)