Title: SQL SERVER 2000 STEP BY STEP
1Showing current time to end user
2Contents
3A. Problem
- Show the current time in a text box at the top of
a web form and alert date time every when the end
user click to a button
4B. Solution
- Web form layout
- Decorating web form using CSS
- Developing handle for buttons click
51. Web form layout
TxtInBody display date time btnScriptBlock Call
JS with script Block btnScriptBlock Call JS with
Startup Block btnScritpInclude Call external JS
file Home link link to saigontech web site
Note H1,H6 with CSS
62. Decorating web form using CSS
- 2.1 Using Inline StyleSheets
- 2.2 Using internal StyleSheets
- 2.3 Using External StyleSheets
72.1 Using Inline StyleSheets
82.2 Using internal StyleSheets
- Going to source
- ? go in head tag and add inline style as below
92.3 Using External StyleSheets
- 2.3.1 Adding new style sheet file
- 2.3.2 Style for elements
- 2.3.3 Style for element id
- 2.3.4 Style for class
- 2.3.5 Using external style sheet file in web form
102.3.1 Adding new style sheet file
- Click to website ? new item and choose Style Sheet
112.3.2 Style for elements
122.3.3 Style for element id
132.3.4 Style for class
- If we want to use class, we have to declare in
CssClass properties of one element
142.3.5 Using external style sheet file in web form
- Click to style sheet file and drag it into design
form or add to head tag as below
ltlink href"StyleSheet.css" rel"stylesheet"
type"text/css" /gt
153. Developing handle for buttons click
- 3.1 Creating java script function
- 3.2 Handling OnClientClick of buttons
163.1 Creating java script functions and
registering them as client script
- AllertHello, AllertDateTime
17 183.2 Handling OnClientClick of buttons
- Displaying Datetime at Page load event
19Alert Datetime when users click to any button