Posts

Showing posts from December, 2022

X ) MS Excel

  MS Excel :-    $ is data reader :- Ms Excel Library :- Using System.Data.OLEDB; Step :-   goto the MSEXCEL -- file -- new -- blanck workbook -- Create -- Cell(Id ,Name,City) -- File -- Save as -- file name (Student) -- select drive (C,D,E etc) -- save as type :- Excel 97-2003 workbook   Q ) How to connect Excel to dotnet  Step 1 :- Ceate a aspx page -- add Excel library (using System.Data.OleDb;) Step 2 :-  OleDbConnection cn;     OleDbCommand cm;     OleDbDataReader dr; Step 3 :-  if (!IsPostBack)         {                   } Step 4 :- Source Code :-   MsExcel.Aspx   <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Z2_MsExcel.aspx.cs" Inherits="ZZExreg" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xh...

W ) MS Access Database

Image
                                   *  Access Database   *     Step 1 :- Open Access (Microsoft access)    Step 2 :- Select Blanck Database     Step 3 :- File Name (Collage.mdb)  -- select drive C ,E ,D --  remove accdb extension compulsory .mdb -- Create    Step 4 :- left side Table -- click on table Right Click -- Desighn View -- TABLE NAME  (Student )    Step 5 :- Click on Field Name cell -- right click and deactivate Primary Key --  Column name (roll _ datatype Number ) (name , mobile ,city datatype Text )   Step 6 :- Save Table -- click onn double click on table and open .                                  * How to Create MS access table  *   

V ) DataTable (Searchable)

Image
                                                     *  DataTable (Searchable Gridview)  * Datatable is provide serchable concept in a Gridview . It is a Pre Defined Library Download the datable library and store in project folder .      Step :- create a page -- paste file in gridview source   <head runat="server">     <title></title>     <%-- <paste 8 file head tag >--%>     <link href="datatables/css/jquery.dataTables.min.css" rel="stylesheet" type="text/css" />     <link type="text/css" rel="stylesheet" href="https://cdn.datatables.net/1.10.16/css/jquery.dataTables.min.css" />      <link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.19/css/dataTables.bootstrap4.min.css" />     ...

U ) Send Email

                                                          *   Email   *     Tranfer email msg to anyone  Rules :- 1 ) Gmail 2 step verification is compulsary to generate 16 digit appcode password              2 ) Using email password to activate 16 digit password  Step :- Gmail -- Security -- two step verification on -- app password -- Enter your gmail password -- Activate -- copy 16 digit password     Library :-    using System.Net.Mail; // library1                    using System.Net;           // library2  Code :-           MailMessage mail = new MailMessage();         mail.To.Add(txtmail.Text.ToString().Trim());  ...

X ) DataList Control (ex .Ecommerce layout)

                                         *  DataList Control *    Display record in Column Format.    Its Automatically set theme element    There are two importants properties use in datlist  Source :-    <asp:DataList ID="DataList1" runat="server" Width="700px" RepeatColumns ="3"   RepeatDirection ="Horizontal" OnItemCommand ="data_command"  > <asp:Button ID="Button1" runat="server" Text="Buy Now" CommandName ="showpro" /> Properties :-1 )  Datasource = dr;                     2 )  Databind ( ) ;                                                                        

W ) 1 ) DataRemove In Folder offline , 2 ) Upload Image Video in Folder On Live Server And Data remove in folder

Image
                               *  DataRemove   *    Q ) How to remove image inside the folder                             {         // How to remove image inside the folder         string filename = DropDownList1.Text;         string path = Server.MapPath("~/img/");         FileInfo f1 = new FileInfo(path + filename);    // library Using System.Io;         if (f1.Exists)         {             f1.Delete();             Response.Write("file deleted succesfully");         }         else         {             Response.Write("file not found"); ...

V ) Auto Generate Column (roll, sr no . etc)

                                      *  Auto Generate Column (roll, sr no . etc) * Q )  Auto generate Column serial no in gridview   step1 :- create page --bind table demoo in gridview -- insert one more column in gridview (sr no  with auto generate )   step 2 :- design add Templatefield ( sr no )   step 3 :- Source -- <templatfield>    <%# Container.DataItemindex+1 %>    <templatfield>                                              

U ) Web Server (FTP)

                                                   *  Web Server (FTP) *  In inside the webserver where application is live in Internet  Duration max 1 year for valid  Web server based on technology

T ) FormView Control

                                             * FormView Control *         Formview Control is use basically to display record in form control.   Step 1 :- Create new page -- toolbox -- formview control -- [>] -- Edit template -- toolbox add html table    Step 2 :- Goto Source --                       <tr>                         <td>                             employee id                         </td>                         <td>                     ...

S ) Store Procedure implementation to web application

Image
                                              *   Store Procedure   * Implementation of store procedure to web application  Store Procedure Using Command Type in page  Command Type Librry  using System.Data; 1 ) How to create Store Procedure in web application ?   Step 1 :-   Server Explorer -- [>] Data Connection  -- Store procedure -- Add new store procedure -- Select ctrl A and all delete from procedure page .  Step 2 :-  Create procedure mypro (mypro is  procedure name) (   @id1 int ,    @name1 varchar(50) ,    @city1 varchar(50) ) as insert into emp values(@id1,@name1,@city1)  return Step 3 :- Click save button and create a store procedure . Step 4 :- select route and create page store.aspx              Design PAge :-   ...

R ) Detailview

Image
                                                                  *  Detailview   * Detailview is reprensting all data in Detail Format. Detailview Bind Process same as Gridview.                                                                 * Gridview Simple Bind Data Video *

Q ) Web Configuration

Image
                                                        *   Web Configuration *   Web.Confige connection string is use to set database path in configuration file. Step :- 1) solution explorer -- web.config --right click open.             2) <configuration>                        <appSettings> < add key ="db1" value ="Data Source=.\SQLEXPRESS;Initial Catalog=vnit;Integrated Security=True" />                   </appSettings>               </configuration>    Q ) How to access connection with configuration.         Step :- Add library :-  Using System.Configuration ;       ...

P ) Database Handling Using Class

                                     *  Database Handling Using Class *   All files inside the App_Code folder  Class Default property is Private. Function Properties Return Value Void is called No Return   Q ) How to create class ?   Step 1 :- solution explore -- route -- website -- add new item -- Class(My class) -- yes --ok. Step 2  :- All delete inside public class code  public class  { }                                                         *  How to create Class Page video   *

O ) Repeater Control And It's Event

                              *  Repeater Control *  * Gridview operate --- Row and column  * Repeter               --- only Row   * Properties           --- 1) Datasource =dr;  ex. Repeter1.datasource=dr;                                     2) DataBind ( ) ;      ex. Repeter1.DataBind ( ) ;    Repeter Can't use OnClick event .   * Source  =  <Repeter id="repeter1" run="">                     ...

N ) Eval Function

                                    * Eval Function *  Eval function is  used to bind data in controls inside GridView, DataList, Repeater, DetailsView etc.     Atrribute :-    '<%# Eval("column name")%>'     Source :-    ex . 1)   <asp:Label ID="Label1" runat="server" Text= '<%# Eval("name") %>' ></asp:Label>   2)   <asp:TextBox ID=" TextBox 1" runat="server" Text= '<%# Eval("name") %>' ></asp: TextBox >        3 )  < img src ='pic/<%# Eval("Pimage") %>' />