/* ------------------------ My Meta Content Here SEO ------------------------ */

Pages

Main Menu

Sunday, November 18, 2012

ASP.NET show alert message from server side

If you want to show msg if you are posting the page to server through update panal (asynchronous postback) then you have to use this function. //During Asynchronous Post Back in Update Panal Use ScriptManager (Inside Update Panal)public void alertBox(string Message){ScriptManager.RegisterStartupScript(Page, this.GetType(),"Key", string.Format("alert('{0}');", Message), true);}If you want to show message in browser and want to show it through javascript (alert function)then use this function. //...
Read More »

Friday, October 19, 2012

Common Regular Expressions in ASP.NET

Some common regular expressions are shown here: Common Regular Expressions FieldExpressionFormat SamplesDescription Name^[a-zA-Z''-'\s]{1,40}$John Doe O'DellValidates a name. Allows up to 40 uppercase and lowercase characters and a few special characters that are common to some names. You can modify this list. Social Security Number^\d{3}-\d{2}-\d{4}$111-11-1111Validates the format, type, and length of the supplied input field. The input must consist of 3 numeric characters followed...
Read More »

Friday, September 21, 2012

Dynamically set Gridview page size property in asp.net

Set Grid view page size property at run time in asp.net: Here's an example: ASPX  <%@ page title="" language="C#" masterpagefile="~/MasterPages/Default.master" autoeventwireup="true"     codefile="AllowPageSizing.aspx.cs" inherits="GridView_AllowPageSizing" %> id="Content1" contentplaceholderid="ContentPlaceHolder1" runat="Server">     Page Size:     id="DropDownList1" runat="server" autopostback="True"      ...
Read More »

Sunday, September 2, 2012

म्योर उत्तराखंड: नंदा देवी डोला, नंदा देवी मेला महोत्सव, २०११

म्योर उत्तराखंड: नंदा देवी डोला, नंदा देवी मेला महोत्सव, २...
Read More »

Friday, August 31, 2012

C Sharp dot net Send Bulk SMS (Sending sms to mutiple recipient.)

Handling Web Request in c sharp dot net Code Here: /// /// Method used to send bulk sms /// /// public void SendMsg(string URL) { try { // Create a request using a URL that can receive a post. HttpWebRequest webRequest = (HttpWebRequest)WebRequest.Create(URL); webRequest.Method = WebRequestMethods.Http.Get; webRequest.AllowAutoRedirect = true; webRequest.PreAuthenticate = true; webRequest.AuthenticationLevel...
Read More »

Wednesday, August 22, 2012

ASP.NET Sorting in GridView By Columns Header In Asp.Net Ascending Descending

http://csharpdotnetfreak.blogspot.com/2012/06/sorting-gridview-columns-headers-aspnet.html Sorting GridView By Columns Header In Asp.Net Ascending Descending This is example of how to enable Sorting In GridView By Clicking on Columns Or Headers In Ascending Or Descending Direction In Asp.Net Using C# And VB If you have Populated GridView With ObjectDataSource or SqlDataSOurce to Insert Update Edit Delete record , then You just have toset AllowSorting...
Read More »

Tuesday, August 21, 2012

SQL SERVER IN query between two comma separated column using split method

Split Method for split column value . . . CREATE FUNCTION dbo.Split(@String varchar(8000), @Delimiter char(1)) returns @temptable TABLE (items varchar(8000)) as begin         declare @idx int         declare @slice varchar(8000)             select @idx = 1                 if len(@String)<1 is="is" nbsp="nbsp" null="null" or="or" p="p" return="return" tring="tring"> ...
Read More »

ASP.NET Getting files from directory

How to get files from directory on the server map path ? GetFilesFromDirectory(MapPath("~/temp/")); private void GetFilesFromDirectory(string DirPath) {      try      {      int id = 0;      DirectoryInfo Dir = new DirectoryInfo(DirPath);               FileInfo[] FileList = Dir.GetFiles("*.*");     dsFiles = comfunc.GetAllUserDetails(Convert.ToInt32(Request.QueryString["id"].ToString()),...
Read More »

Tuesday, July 17, 2012

Sql Server 2005: Change schema for all tables

Recently I have needed to change the schema for all the tables in a Sql Server 2005 database. Sql Server 2005 provides a T-SQl statement capable to change the schema for a given object called ALTER SCHEMA  You may use the following syntax to change the schema for all the tables in a database. Just change the "new_schema" string with the desired one: exec sp_MSforeachtable "ALTER SCHEMA new_schema TRANSFER ? PRINT '? modified' " Enjoy the Scrip...
Read More »

My Blog List