All control (dotnet development)

 1.Dot net is provide web development area 

Q.How to create web application in dot net

step1: create your own directory 

step2: open dot net


file->new->website->select visual c#->Asp.net website->browse->select directory


Dotnet Environment 

  Solution explorer 

          Represent all file, folder, library & resources 


Server explorer 

         Server explorer representing database  


*Window menu->Reset window layout(for window layout)

*Toolbox 

         All types of control are in toolbox 


*Property window 

              Representing the property 


Q. How to configure dot.net application 

  • file->new->website->select visual c# asp.net website ->directory ->ok
  • Remove all files from solution explorer 
  • Remove account folder 
  • in web application web page is also called web forms 

Q. How to create web page 

  1. go to solution explorer ->select root-> select website-> add new item language c#-> web form 


*Text is a default property of control

I go to solution explorer select root- select website add new item language en web form


Text is a default property of control


Note: 

  • Dotnet first page name always default 
  •  Place code in separate file always check


*Dot. Net Area

1) design - aspx (extention) 

2) Source - HTML

3) Code - C# (extention .cs) 


* In dot net all code inside the event only.

*Display Result in a text box.  using tostring();


I. How the change textbox Baground color 


* Dot net support above 256 colors

dot not net colors are in drawling 

       C programming Supports only 16 colors.

        C programming supports graphics 


Navigation

           There are twee concept of Navigation

            1) Control 

            2) Code


 *Navigation Control

  • Link Button 
  • hyperlink
  • image button

1. Link Button

         There are two properties 

                1) Text

                 ii) Post Back URL


8. Hyperlink

           Open the Web URL

Property of hyperlink Control 

  • Text
  • Navigate URL (write the website path)

Q How to create Web page ? (for configuration) 

     Solution explorer-->root-->website menu-->add new item-->c#--> web form


First page always default 

*Control creation 

    design-->aspx

    code-->cs


TextBox1. Bagcolor = system drawing color. Red


* Text Box property: text mode


3. Image Button 

           Image Button Control is wed to Visit Page property. with the help of image property

 Image URL 

 Fest Back URL


*DROP DOWN LIST

             Array control is called dropdown list(dropdownlist1.items.add(textbox2.text);


Q.How to insert data in dropdown list

--> Select drop list -->click arrow-->edit item-->click add--> write on text


Q. How to retrieve data value from drop down list

 ans: Auto past Back ·True (In dropdown list)


QHow to match dropdown data value


☆ for Text Baground color : 

if (Dropdownlist2.SelutedIndex == 0) 

{

"TextBox3. Back color = System.Drawing.Color Red;

}


A Check Box (Multiselection)

Event 

1) Checked

ii) True & false,


Two properties

  • check 
  • Auto Baxt Back True


* Check Box defaut event :- check change

NOTE: if condition compulsory is check box


*DATE & TIME

         Now library used in date-time 

(label1.text=datetime.now.tostring();)  (date time for both

only date:-(Label1.Text = datetime.now.toshort dateString ();)



DRAWBACK OF LISTBOX

         Retrieving space in computer screen 

Listbox event 

          listbox is used to select insex change event 

listbox property- Autopostback - true


  •  Multiview control 

it is a content management control

multiview is display multiple content in single web page

Multiview is an array control (start with 0 position)


  • property of multiview control

Active view index= -1

replaced by 0 


  • View control

view control is used to create inside the multiview control


  • Validation control

accept correct information only is called validation.

 

  • There are some validation control used in dot net

1. Requiredfieldvalidator

    properties

  • error message(message)
  • control to validator(textbox)

2. Rangevalidator

properties

  • error message(message)
  • control to validator(textbox)
  • minimum value
  • maximum value

3. RegularExpression

properties

  • error message
  • control to validate
  • Validation expression (\d{10})


  • File upload in dot net 

   file upload control is used to uploading all type of data (image,pdf,etc)

(~) means root directory finder.


  • Syntax

FileUpload1.SaveAs(Server.MapPath("~") + "//pic//" + FileUpload1.FileName);

        Image1.ImageUrl = "~/pic/"+FileUpload1.FileName;



  • Radiobutton list
syntax

TextBox1.Text = RadioButtonList1.Text;








Comments

Popular posts from this blog

Basic Query program(insert,update,delete,select)

Data transmission and query string

Detailview(program)