Skip to main content

Posts

Preventing BackSpace in Browser

PREVENTING BACK SPACE IN BROWSER       Place the javascript code in header of each page , #target in Code refers to a text box target"  style="display:none;"/>     Place this text box in  Body Section of Html Page                       On pressing back button the page focus goes to this text box

Export to Pdf and Excel In Rdlc Report

Export To Excel  private void ToExcel()         {             Warning[] warnings;             string[] streamIds;             string mimeType = string.Empty;             string encoding = string.Empty;             string extension = string.Empty;             string HIJRA_TODAY = "01/10/1435";             byte[] bytes = ReportViewer1.LocalReport.Render(          "Excel",          null,          out mimeType,          out encoding,          out extension,          out streamIds,          out warnings);             Response.Buffer ...

Asp Validations(Email,Phone Nos)

Email Validations                                                 Display="Dynamic" ValidationExpression="^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$"> Check E-mail PinCode                                                               ErrorMessage="Only six digit values" Font-Size="XX-Small" ValidationExpression="^[0-9]{6,6}$" ValidationGroup="grp2">                                                             Land Line No                               ...
STREAM WRITER IN C#        A stream writer is used to append or to overwrite a text over another.                                             streamwriter stwriter =new streamwriter( document.txt );        It creates  a text named document.       If such a document already exists it replaces the previous one.       stwriter .Flush() :   It is used to flush or to clear a particular file or data       stwriter.Close() : It is used to close a particular stream.
   CURSORS IN C#      Cursor is the icon which moves when we move mouse on a screen in a page in a c# .      1,To set a what to do when a cursor is over a button or a text box.         button1. Cursor =  Cursors .Hand;        listBox1. Cursor = Cursors .No;                     
To Show a SerialNo in  a FlexGrid:        private void gridindex( C1FlexGrid flxName)             {                 for ( int i = 1; i < flxName.Rows.Count - 1; i++)                 {                     if (flxName[i, "SCode" ] + "" == "" ) { break ; }                     flxName[i, "SL NO" ] = i;                     counterflag = i;                 }    ...