asp validation controls is not working while OnClientclick function fired

  ASP Valiadator controls are not fired if we use OnClientClick property in button. So we need to fire this validation control inside of OnClientClick Function using Page_ClientValidate().

<script language="javascript">
 function validation() {
            //Your CODE HERE
       return true;
       return Page_IsValid;

Job of Page_ClientValidate() 

        This function check the page is valid or not. If any of Validator is not valid this function return false.

If you using more than one validation group, you can specify the group name like

Add space to string in c#

Hi, here i have to remind  we can add specified space or byte to existing string.

string spacestr = "123";
spacestr = spacestr .ToString().PadRight(10 , '*'); //for asterisk   
spacestring  = spacestring  .ToString().PadRight(10 , ' '); //for space

now 'spacestr ' value will be :123*******, the seven * will added to right side of the 'spacestr .
now 'spacestr ' value will be :123       , the seven sapce will added to right side of the 'spacestr .

if we need to add space left side of str
spacestr = spacestr .ToString().PadLeft(10 , '*');

now 'spacestr ' value will be :*******123, the * will added to left side of the spacestr .
Probably we need space, we replace space ' ' character instead of  asterisk '*' 

Next line in single node in xml

if We need,we can use next line in single node, example below

First we have to know how much bytes construct a line in the xmlnode,
so manually we add empty space after a value
<Student address='raj       9865812345INDIA     '></student>
here we have 3 inner line, each line have 10 bytes.

Hide status bar of Link button

Hide status bar of link button 
We have use the below code to disable status bar of link button in IE, can't in FireFox. 
<asp:LinkButton ID="lnkbutn" onMouseOver="window.status='';" onMouseOut="window.status='';"  
oncontextmenu="window.status='';" runat="server" Visible="false"  
OnClick="lnkbutn_click"> >> Next </asp:LinkButton>

the parameterized query which was not supplied

This error will raise while the passing parameters with NULL values, we can handle this exception 
 parameters.Add("@lRefNo", SqlDbType.NVarChar, LoanRefNo, 50);
  parameters.Add("@lRefNo", SqlDbType.NVarChar,DBNull.Value, 50);

textmode password field blank when using wizard

The Textbox's Text Mode is password when using it in Wizard or Multiview the text values will get clear while moving to another view or wizard, So in like that situation we go to ViewState or Session,Dont go for hidden Field cause we can see hidden field values in View Source,so its not secure.

ViewState["mypass"] = txtPassword.Text;
Multiview1.ActiveViewIndex =1;