Monday, November 26, 2012

Creating Captcha Code in ASP.Net

Before entering in to the topic first we must know “What is the Captcha code?” and “Why we used it?” Most of the web sites having the Captcha validation to their sites.

What is the Captcha code?
Captcha code is simply a combination of some characters and numbers like ‘Alk13’ or ‘aTu2eP’ etc.

Why we used it?
We used it for validating this code was really typed by the human.

Wednesday, November 7, 2012

Partial Methods in C#

All of us know that partial type allows us to split definition of type across multiple files but do you know C# also provides supports for partial methods too. Partial methods are used when your code is auto generated by code generation tool. The tool will write only method definition and leave the implementation of for developer if they want to customize.

Thursday, October 25, 2012

OnClientClickevent and AJAX is not working for telerik RadControls

One may need to provide a confirmation dialog or check some validation to the users and initiate an AJAX request if confirmation accepted or validation perform successful. Confirmation using standard post backs often looks like this: 

<asp:Button ID="btnSaveComplaint" runat="server" Text="Save" OnClick="btnSaveComplaint_Click" OnClientClick="return ValidateMacroText();" /> 
 Note: ValidateMacroText() is javascript function which returns true if validation perform successfully.

Friday, October 5, 2012

SQl Server Tricks-Part2

Get list of all procedures created on a particular date in a database

To get the list of all the procedures created on a particular date in a data base, you can use this query.

Use YourDBName
Go
select name from sys.objects
where type = 'P'
and create_date=@yourdate
Go

Thursday, October 4, 2012

SQl Server Tricks-Part1

Getting the List of all databases on a server

To get list of all database on a server, you can use this query.
USE master
GO

SELECT
*
FROM sys.Databases
GO
OR you can use the sp_helpdb procedure for this.

^ Scroll to Top