Feeds:
Posts
Comments

Archive for March, 2007

Validation Expression for Field Validator
======================================
1. Multiple E-Mail Validation [ Separated by Semicolon ';' ] ( For Regular Expression Validator )

^(([a-zA-Z0-9_\-\.]+)@([a-zA-Z0-9_\-\.]+)\.([a-zA-Z]{2,5}){1,25})+
([;.](([a-zA-Z0-9_\-\.]+)@([a-zA-Z0-9_\-\.]+)\.([a-zA-Z]{2,5}){1,25})+)*$
2. Multiple E-Mail Validation ( For Regular Expression Validator )

\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*([,;]\s*\w+([-+.]\w+)*@\w+
([-.]\w+)*\.\w+([-.]\w+)*)*
3. File Exteansion Validator ( For Regular Expression Validator )
^(([a-zA-Z]:)|(\\{2}\w+)\$?)(\\(\w[\w].*))+(.jpg|.jpeg|.gif|.bmp|.tif|.png)$
4. Validate only Numeric Fields. ( For Regular Expression Validator )
^([0-9]{1,})$
 

Read Full Post »

I’m explaining Delegates and Event with the use of UserControl and Form in the Asp.Net Webpage. 

Steps for usercontrol
====================

1. First create one user control (Like ucTestDelegate)
2. Declare one Delegate (dont declare it in with in function but declare it in class)
3. Declare one event that uses this delegate (Declare it in class)
4. signature of event and [...]

Read Full Post »

1. Finding the particular Data from the Dataset,Its Row Position and Current Page in Grid
====================================================================================
DataSet dsQuoteList = objQuote.GetQuoteBankList();Giving a constraints to the first column that is the ID primary key like: 
Now,The below code will find the perticular ID int the given dataset and return new Datarow..
 
Now finding the Row position (RowIndex) in the Dataset, like..: 
Finally, [...]

Read Full Post »

In the Web.Config file
========================
Do not write “–” in your Web.confg fileAfter the end of section, start a new  
 
objLogin.UserID = txtUserID.Text;
objLogin.Password = txtPassword.Text;
// Check wheather Admin is Authenticate or not.
if (objLogin.IsAdminAuthenticate())
{
FormsAuthentication.RedirectFromLoginPage(txtPassword.Text, false);
Response.Redirect(“AddMovie.aspx”);
}
else
{
lblMessage.Text = “Check UserID and Password.”;
txtUserID.Focus();
}

Read Full Post »

Open Popup Window in the Center of the screen.
=============================================
function OpenPop(ItemID)
{
var LeftPosition = (screen.width) ? (screen.width-505)/2 : 0;
var TopPosition = (screen.height) ? (screen.height-250)/2 : 0;

window.open(‘Pop_QuoteInfo.aspx?id=’+ItemID,’MyTitle’,’height=250,width=505, top=’+ TopPosition +’, left=’+LeftPosition+’, scrollbars=yes, resizable=yes, status=no’);
}Javascript Trim() Function
=========================
function trim(inputString) {
// Removes leading and trailing spaces from the passed string. Also removes
// consecutive spaces and replaces it with one space. If [...]

Read Full Post »

Use Namespace================using System;using System.Data;using System.Configuration;using System.Collections;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.WebControls;using System.Web.UI.HtmlControls;using System.IO;using System.Drawing;using System.Drawing.Imaging;using System.Runtime.InteropServices;
Code Behind============
System.Drawing.Image img; img = System.Drawing.Image.FromFile(cStrTextFileName);
Bitmap bmp = new System.Drawing.Bitmap(img);
System.Drawing.Image.GetThumbnailImageAbort imgCallBack = [...]

Read Full Post »