Unit - 2 Part-1 Image Fileupload Theory
Unit - 2 Part-1 Image Fileupload Theory
[UNIT – 1 CONTROL
ADVANCE & 2]
(1) File Upload :
FILE UPLOAD is used to upload of any file in web page of asp.net like word file, exel
file , jpg and jpeg etc….
In web page , first you have to put file upload control from the Tool box.
File upload control contain two part here. The first part is look as text box and the
second part is look like the button written on it Browse.
When it is rendered on the page , your page look like the following :
When you click on Browse then open the ( menu) Box like the following :
[UNIT – 1 & 2]
Using above box or menu , you can select the file from your drive or computer and
click open button.
When you click on open button , your page look like the following :
it is rendered on the page, it is implemented through <input type=file /> HTML tag.
str = Server.MapPath("~//images//"+FileUpload1.FileName);
FileUpload1.PostedFile.SaveAs(str);
}
[UNIT:
PROPERTIY OF FILE UPLOAD CONTROL – 1 & 2]
1) BackColor :
This property is used to set the back(ground) color of the control.
2) BorderColor :
This property is used to set the border color of the control.
3) BorderStyle :
This property is used to set the border style of the control.
4) Font :
This property is used to set the font size, font style like BOLD, ITALIC etc of the control.
5) Height :
This property is used to set the height of the control.
6) Width :
This property is used to set the Width of the control.
7) ForeColor :
This property is used to set the fore color of the control.
IMAGE CONTROL is used to display the images on web page or some alternative
text if image can not be display like jpg and jpeg etc….
In web page , first you have to put image control from the Tool box.
The image control just look like the panel type box.
When it is rendered on the page , your page look like the following :
[UNIT – 1 & 2]
Shared I as Integer = 0
If I = 0 Then
Image1.ImageUrl = "~/IMAGE/IM1.JPG "
I = 1
ElseIf I = 1 Then
Image1.ImageUrl = "~/IMAGE/IM2.JPG "
I = 0
End If
End Sub
1) ImageUrl
This property is used to set the image path which is display on the control.
3) AlternateText :
This property is used to set the alternate Text which is display on the
control if the image is not dispolay.
4) BackColor :
This property is used to set the back(ground) color of the control.
5) BorderColor :
This property is used to set the border color of the control.
6) BorderStyle :
This property is used to set the border style of the control.
7) Font :
This property is used to set the font size, font style like BOLD,
ITALIC etc of the control.
8) Height :
This property is used to set the height of the control.
9) Width :
This property is used to set the Width of the control.
10) ForeColor :
This property is used to set the fore color of the control.
The HyperLink control is look like the HTML <a> element OR Tag.
The Hyperlink control is link one webpage to other by using the NavigateUrl
property.
When it is link to other page then it’s color can change the blue color.
[UNIT – 1 & 2]
Property Description
ImageUrl Path of the image to be displayed by the control
NavigateUrl Target link URL
Text The text to be displayed as the link
Target The window or frame which will load the linked page.
Generally, Wizards represent a single task and user moves, from the current step
to the next or immediately preceeding step in case he/she wants modification.
1) WizardSteps :
This property is used to add the steps in left side and also change the title of
the step.
2) StartNextButtonStyle :
3) StartNextButtonText :
1) GroupingText:
This property is used to do the group of controls and give the caption of the
group.
2) Visible:
This property is used to visible the panel or not. If it is true then visible and
If it is false then unvisible the panel.
[UNIT –CONTROL
NAVIGATION 1 & 2]
(1) Menu
The ASP.NET Menu control is used to create and display the menu in webpage.
The ASP.NET menu control allows you to develop/ display menu control ASP.NET
Web pages in two way.
1) statically and
2) dynamically .
You can configure/setting the contents of the Menu control directly in the control.
you can also specify the contents by binding the control to a data source.
Without writing any code, you can control the appearance, orientation, and
content of an ASP.NET Menu control.
The Menu control has two modes of display: static and dynamic.
Static display means that the Menu control is fully display/expanded all the time.
The entire structure is visible, and a user can click on any part.
In a dynamically displayed menu, only the portions you specify are static, other
portion is not static .If you want to display their child menu items then the user
holds the mouse pointer over the parent node.
For example :
You can control Dynamic display behavior by using the following property of the
Menu control.
For example, if your menu has a static level of 3 and a dynamic level of 2, the
first three levels of your menu would be statically displayed, while the next two
levels would be dynamic.
You can define content for the Menu control in two ways: by adding individual
MenuItem objects (declaratively or programmatically), and by data binding the
control to an XML data source.
You can add individual menu items in the control by specifying/using the Items
property.
The Sitemap Path control is used to add a site map (breadcrumbs) to the website.
A site map is a way to present all folders and pages of the website.
The sitemap control include the pages of the particular website and display the
name of those pages.
We can also say that sitemap control display the links for connecting to URLs of
other page.
The sitemap control uses the property of the SiteMapProvider for access data
from the database and store the information in a database.
The SiteMapProvider property use the System.Web namespace for use database.
[UNIT –that
Following are some important properties 1 &are
2] very useful.
The TreeView control is an object model in ASP.Net which allows creation of nodes
dynamically.
[UNIT – 1 & 2]
1) BACK COLOR :
This property is used to set the background color.
2) BACKGROUND IMAGE :
This Property is used to set the background image.
3) FONT
This property is used to set the font color.
4) NODE
This property is used to get the collection of tree node.
5) SELECTED NODE :
6) ShowCheckBox -
This property used to set the check-box is required or not.
7) ShowLines –
This is used to show the flow of the nodes in the lines.