Posts

Showing posts from November, 2022

M ) Export Excel ( Download Control Data in Microsft Excel format )

                                                             *   Export Excel *    Export excel Download a PDF FILE In Microsoft Execl format.     Q )   How to hide extra columns in Export excel pdf       Code = GridView1.Columns[6].Visible=false; Step 1) select any gridview page 2) toolbox -- button(export excel) 3) paste all export excel coding in export excel button 4) StringWriter and HtmlForm select and rightclick -- resolve -- and select librarys stringwriter and htmlform        

L ) Gridview Paging (Sqldataadapter)

                                 * Gridview Paging   *  * POINTS     In gridview display 10 record in each page . //ekpage pe only 10 record     Dataadapter is use to read data in a form of group.     Dataset work with DataSet OBJECT.     Cm Object can't use Adapter Concept .     Adapter Object field using Dataset Object.        ex sqlDataAdapter (sda object name)= new sqlDataAdapter ( );   Datareader read only single data . * DATASET --write click on dataset --resolve--sqlldataadpate--ok activate ho jayega   STEP 1   D esign :- create page(gridpaging)-- gridview controle--boundfield(id,name,cusno)    Step 2 SOURCE ATRIBUTE :--add atribute in Grid 1) ALLOWPAGING ="true" 2) OnPageInd...

K ) Grid Image FileUploader , ass (resume insert and DownLoad HyperLink)

                                                      * Grid Image *    *  Imagefield  is used in gridview       Properties Of ImageField :- 1)Dataimageurl :- column name  2) Dataimageformatstring :- ~/foldername/{0} * Step  :- create page (gridimg) -- gridview -- select grid -- [>] -- edit column --- bound field(id,name) -- Imagefield(pic) -- add image field properties 1) Dataimageurlfield :-column name (pic)--2) Dataimageurlformatsting :- ~/foldername/{0}     Q ) How to set Gridview Imgaefield height and Width    Add tag And Attribute in source Under ImageField Tag  :-   < ControlStyle BorderColor ="ActiveBorder" Height ="100px" Width ="100px" />      

J ) Image Handling (normal) , Ass create Student hollticket using Image handling

Image
                                                        *  Image Handling *   * Database store all types of Graphics    Step :- * Design -- create page(imghandi) -- textbox(id,name) -- fileuploader controle -- button( upload ) -- Image controle -- label -- button(submit)  *  Create folder step :- solution explore -- select route -- right click on route -- new folder -- ok.    upload button code    {     FileUpload1.SaveAs(Server.MapPath("~") + "/FOLDERNAME/" + FileUpload1.FileName);     Image1.ImageUrl = "~/FOLDERNAME/" + FileUpload1.FileName;     Label1.Text = FileUpload1.FileName;    }      

I ) Naming Container normal , Ass (whatsapp, Del,upd in Grid ) ASP.net in C#

                            *   Naming Container    *         Gridview coding for outer button then use FOREACH         Inside the gridview Button we have to use Naming Container concept.          Naming container use grid view Row Object .ex( R1 )     Syntax :-     GridViewRow r1 = ((Button)sender).NamingContainer as GridViewRow; * gridview mein button lgane par ONclick Atribute  dena  compulsary  hai     ( OnClick ="Delete1_Click" )     Steps :1) create page -- show function and call -- gridview--            2) databound(id,name,city) -- template field(delete button)            3) source --   <itemtemplate>...

H ) allodb

G ) Ass EmailPassword Recheck

                              * Assigment :- EmailPassword Recheck *      1 ) 1st page   :- Insert Data  (name,email,mobile,password,date)                            :- Date auto generate       2 ) 2nd page   :- Match email and password                               3 ) 3rd page   :- Print all information in grid                                        

F ) Ass Parameter Student Mark Entry

                                       * Assigment :-  Parameter Student  Mark Entry   *               1) 1st Page :-   create submit page and add 10 record             2) 2nd Page :- create second page and update marks             3) 3rd Page :-  create 3rd page and show all data in grid

E ) Auto Incriment (ID and Cusno) assigment

                                                  *  Auto Incriment *                     *   Auto Generate Id          code :-    string k = "select count(id)+1 from paradb";     //id incrimiment by +1 auto                     cm = new SqlCommand(k, cn);                     txtid.Text = cm.ExecuteScalar().ToString();                 * Auto generate Cusno        code :- txtcusno.Text = "NR-" + DateTime.Now.ToString("yyyy") + "00-" + txtid.Text;                                      ...

D ) SCALER FUNCTION(min,max,avg,sum) , GRIDVIEW ACCESS CONTROL(foreach) , Ass :- (Qty*Cost=Total)

                       *  SCALER FUNCTION   *  *      scaler function is similar to Sql function .(sum,min,max,avg)  *    scaler function return only one value.     Step  :- select gridview -- goto the source -- use show footer atribute in gridview -- <Gridview    ShowFooter = "true"  > tag   Code  :- GridView1.FooterRow.Cells[1].Text="total amount" ;     Q ) How to use Scaler Function      code :-   string k1 = "select sum(qty)from grid";                 cm = new SqlCommand(k1, cn);                GridView1.FooterRow.Cells[2].Text=cm.ExecuteScalar().ToString();                                  * simple scaler function  ...

C ) DATA CONTROL GRIDVIEW (Boundfield_TemplateField_Connectioncode) + Gridview Footer Row

                                  *  DATA CONTROL *  * Data control is use to display data in form of visualization.      *  Controle Name   Gridview Control   Repeater Control   Formview Control  Datalist Control  Detailview Control  Listview Control Only two propeties of Data Controls             Datasource=dr;       Databind ( );

B ) DROPDOWNLIST CONTROL

                          * DROPDOWNLIST *                Properties :- 1)  Datasource = dr ;                                   2)  Datatextfield = "column name" ;                                  3) Databind ( ) ;                                    ddlstate.DataSource = dr;                                   ddlstate.DataTextField = "state";                                   ddlstate.DataBind();          ...

A ) WEB FORM NORMAL PAGE (INSERT , FIND , UPDATE , DELETE)

      *    NORMAL PAGE (INSERT , FIND , UPDATE , DELETE)  *

Machine Test * DATABASE CONNECTIVITY IN WEBFORM *

                                             *    DATABASE CONNECTIVITY IN WEBFORM  *         1 ) Include database library             a )  SQL Server   -- SQLCLIENT            b ) Exel / Access  -- OLEDB            c ) XML              -- XML         Step 1 :- open dotnet -- file -- new website -- Add new page -- Default.aspx     Q ) How to connect database in dotnet         Step 2 :- server explorer -- right click on Data Connection -- add connection -- Data                                               Source(Microsoft...