RichControl in Asp.net

9,685 views 29 slides Apr 03, 2014
Slide 1
Slide 1 of 29
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26
Slide 27
27
Slide 28
28
Slide 29
29

About This Presentation

No description available for this slideshow.


Slide Content

1
Rich Control In Asp.net

2

What is Rich Control ?

AdRotator Control and Example

File Upload Control and Example

Multiview Control and Example

Calender Control and Example

Wizard Control and Example

Advantage

Reference
Content
Rich Control

3
What is Rich Control..??

The Control which are not standard control and allow
you to do some advanced functionality are know as
“RICH CONTROL”

Rich controls are built with multiple HTML elements
and contain rich functionality.

Although rich control is combination of other
standard controls,it work as a single control.
Rich Control

4
AdRotator Control

ASP.NET gives you one very useful and important
control to develop advertisement banners called
« AdRotator Control »

AdRotaror control has only one very important
property called « AdvertisementFile » which
basically a XML file.

AdvertisementFile Contains details about the
advertisements.
Rich Control

5
Properties

Add control where banner is to display

Properties:
AdvertisementFile:-XML file of banners
KeywordFilter:-only banners with this keyword
Target :-where to display hyperlink
Height/Width:-if want the same for all banners
Rich Control

6
Syntax
<asp:AdRotator id="Value"
AdvertisementFile="AdvertisementFile
KeyWordFilter="KeyWord“

Target="Target"
runat="server“
AlternateText=“text”/>
</asp:AdRotator>
Rich Control

7
Cont…
Only ads with this keyword
XML file of banner info
Rich Control

8
Example
<asp:AdRotator ID="AdRotator1"
runat="server"
AdvertisementFile ="ads.xml"
AlternateText="Hello" />
</asp:AdRotator>
Rich Control

9
Output
Rich Control

10
File Upload Control

The file upload control used to select (Browse)any
file from your pc and then the uploaded file is used
for some specific operation.

It just gives you the path of file along with its name.
Rich Control

11
Property

File Name:
Gives you the name of file which is
uploaded.

HasFile:
Return Boolean value True or False.

FileContent:
This is collection which gives details about
file contents.
Rich Control

12
Example

protected void Save_Click(object sender, EventArgs e)
{
string str;
string f1;
f1=Path.GetFileName(FileUpload1.PostedFile.FileName);
FileUpload1.SaveAs(Server.MapPath("~/images/" + f1));
str = "images/" + FileUpload1.FileName.ToString();
}
Rich Control

13
Output

14
Multiview

Multiview Control used for many view.

Sometime it have many screens but at a time display
only one screen.

Multiview is a container of group of view control.

In Multiview select only one view at a time that is
called “Active View”
Rich Control

15
Property

ActiveViewIndex:
It will be used to set or get the index no. of
current active view.

Views.Count
Views.count will give total no. of views under
multiview.
Rich Control

16
Example

<body>
<asp:multiview ID="Multiview1" runat="server">

<asp:View ID="view1" runat="server">
<center><h1>Calendar</h1></center>
<asp:Calendar ID="cal1" runat="server"></asp:Calendar>
</asp:View>

<asp:View ID="view2" runat="server">
<center><h2>Image</h2></center>
<asp:Image ID="img" runat="server" ImageUrl="~/ab/Koala.jpg"/>
</asp:View>

</asp:multiview>
Rich Control

17
Output
Rich Control

18
Calender Control

The Calendar control is created by the Calendar class

Thé calendar displays a single calendar month

By default, the current month is displayed

You can configure the appearance of the calendar
by setting the properties of the calendar control.
Rich Control

19
Properties

The Calendar control supports the following
properties:
DayNameFormat—Enables you to specify the
appearance of the days of the week.Possible values
are FirstLetter, FirstTwoLetters, Full, Short.
NextMonthText—Enables you to specify the text
that appears for the next month link.
Rich Control

20
Cont…

SelectedDate—Enables you to get or set the selected
date

SelectionMode—Enables you to specify how dates
are selected. Possible values are Day, DayWeek,
DayWeekMonth.

ShowDayHeader—Enables you to hide or display
the day names at the top of the Calendar control.
Rich Control

21
Example
<form id="form1" runat="server">
<asp:Calendar ID="Calendar1" runat="server"
SelectionMode="DayWeekMonth">
</asp:Calendar>
</form>
Rich Control

22
Output
Rich Control

23
Wizard Control

Wizard has many screen which comes after one
another.

For wizard we say “Start->Next->Next->..->Finish”

Where screen starts with “Start” scrren and goes up to
last screen.

Wizard has different THREE parts:
Main , Header , SideBar
Rich Control

24
Property

ActiveStepIndex:
It is used to set or get the index no.of currently
active step.

HeaderText:
HeaderText will be display in all the steps as
header information.

WizardSteps.Count:
Returns how many no. of steps are specified
in wizardSteps.

Rich Control

25
Example

<asp:Wizard ID="Wizard1" runat="server">
<WizardSteps>
<asp:WizardStep ID="WizardStep1" runat="server" Title="Step 1">
</asp:WizardStep>
<asp:WizardStep ID="WizardStep2" runat="server" Title="Step 2">
</asp:WizardStep>
</WizardSteps>
</asp:Wizard>

Rich Control

26
Output
Rich Control

27
Advantage

It is very flexible control.

Control has high performance.

Rich control reduce the code and give the high
performance.

Consume the developer time.
Rich Control

28
Reference

asp.net-tutorials.com/controls

asp-net-example.blogspot.com

www.tutorialspoint.com/asp.net

www.wrox.com/.../ASP-NET
Rich Control

29
Thank You
Tags