Monday, March 23, 2009

Blinking Text Using JavaScript

functions for the script tag in body
[code]
function prog1(objid)
{
var obj;
obj=window.document.getElementById(objid);
obj.style.backgroundColor="red";
obj.style.color="yellow";
}
function prog2(objid)
{
var obj;
obj=document.getElementById(objid);
obj.style.backgroundColor="yellow";
obj.style.color="red";
}
function blinktext()
{
if(p3.style.visibility=="visible")
{
p3.style.visibility="hidden";
}
else
{
p3.style.visibility="visible";
}
window.setTimeout("blinktext()",300);
}
[/code]
call binktext function onload of body tag and
in p tag use the following line
[code]
onmouseover="prog1('p1')" onmouseout="prog2('p1')"
[/code]

for more details please see the attachment
--
Thanks and Regards
Meetu Choudhary

Use a session variable in the class files in c# ASP.Net

To use the value of a session variable in the class files using c# with ASP.Net use the following statement

direct use of Session collection is not allowed in the .cs files so to achieve the purpose we have to follow the whole path i.e

System.Web.HttpContext.Current.Session["varname"].ToString()

Example:
[code]
System.Web.HttpContext.Current.Session["con1"].ToString()
[/code]
++
Thanks and Regards
Meetu Choudhary

ASP page with database handling

ASP page with database handling

Here is an Sample Example Which Handles MYSQL 5.0 DataBase with .Net

[code]
<%
//This page will be refreshed with each access!
Response.Expires=-1
%>


<%
//create connection object
set con=server.createobject("adodb.connection")
//Conection String and open the connection
call con.open("provider=msdasql;driver={Mysql};server=mysqlServerName;uid=username;pwd=password;database=dbnsme;")
//For Select Query Execution
set rs=con.execute("select * from tablename )
//displaying the records in a table format
//loop till rs has records
while not rs.eof
response.write("<tr><td>" & rs.fields(0) & "</td><td>" & rs.fields(1) & "</td></tr>")
rs.movenext
wend
rs.close()
response.write("</table>")


//Update Process


//update query
//a will contain how mny records are modified
con.execute("Upadte Query goes here"),a
response.write(a & " records updated")
//response.write("Done")



//Insert Process


//insert query
con.execute("insert into RegClLog (SrNo,ProdKey,ClDtTm) values('"& request.form("hidSrno") &"','"& request.form("hidResult") &"','"& request.form("hidClDtTym") &"') "),a
response.write(a & " records Inserted")

//close connection
con.Close()
%>

<html>
<head></head>
<body>
<form action="#" method="post">
Any HTML CODE here will run perfectly. to display the page

</form>
</body>
</html>


//Trapping Errors in ASP.
//This will get the last error occurred.
<%
dim objErr
set objErr=Server.GetLastError()
response.write("ASPCode=" & objErr.ASPCode)
response.write("
")
response.write("ASPDescription=" & objErr.ASPDescription)
response.write("
")
response.write("Category=" & objErr.Category)
response.write("
")
response.write("Column=" & objErr.Column)
response.write("
")
response.write("Description=" & objErr.Description)
response.write("
")
response.write("File=" & objErr.File)
response.write("
")
response.write("Line=" & objErr.Line)
response.write("
")
response.write("Number=" & objErr.Number)
response.write("
")
response.write("Source=" & objErr.Source)
%>

[/code]


Thanks and Regards
Meetu Choudhary
Founder: http://www.msdotnetmentor.com

Keycodes at a glance

While working in the real time development environment some times we feel a great need to know the key codes by which a character is represented. as the computer does not understands the graphical representation but using the keycodes and keyascii we can trace the character used by the user so here is the list for your use. keeping in mind the windows operation system.

Key Code

0 
1 
2 
3 
4 
5 
6 
7 
8 * *
9 * *
10 * *
11 
12 
13 * *
14 
15 
16 
17 
18 
19 
20 
21 
22 
23 
24 
25 
26 
27 
28 
29 
30 
31 
32 [space]
33 !
34 "
35 #
36 $
37 %
38 &
39 '
40 (
41 )
42 *
43 +
44 ,
45 -
46 .
47 /
48 0
49 1
50 2
51 3
52 4
53 5
54 6
55 7
56 8
57 9
58 :
59 ;
60 <
61 =
62 >
63 ?
64 @
65 A
66 B
67 C
68 D
69 E
70 F
71 G
72 H
73 I
74 J
75 K
76 L
77 M
78 N
79 O
80 P
81 Q
82 R
83 S
84 T
85 U
86 V
87 W
88 X
89 Y
90 Z
91 [
92 \
93 ]
94 ^
95 _
96 `
97 a
98 b
99 c
100 d
101 e
102 f
103 g
104 h
105 i
106 j
107 k
108 l
109 m
110 n
111 o
112 p
113 q
114 r
115 s
116 t
117 u
118 v
119 w
120 x
121 y
122 z
123 {
124 |
125 }
126 ~
127 
128 €
129 
130 ‚
131 ƒ
132 "
133 …
134 †
135 ‡
136 ˆ
137 ‰
138 Š
139 ‹
140 Œ
141 
142 Ž
143 
144 
145 '
146 '
147 "
148 "
149 o
150 -
151 -
152 ˜
153 ™
154 š
155 ›
156 œ
157 
158 ž
159 Ÿ
160 [space]
161 ¡
162 ¢
163 £
164 ¤
165 ¥
166 ¦
167 §
168 ¨
169 ©
170 ª
171 "
172
173 *
174 ®
175 ¯
176 °
177 ±
178 ²
179 ³
180 ´
181 µ
182
183 ·
184 ¸
185 ¹
186 º
187 "
188 ¼
189 ½
190 ¾
191 ¿
192 À
193 Á
194 Â
195 Ã
196 Ä
197 Å
198 Æ
199 Ç
200 È
201 É
202 Ê
203 Ë
204 Ì
205 Í
206 Î
207 Ï
208 Ð
209 Ñ
210 Ò
211 Ó
212 Ô
213 Õ
214 Ö
215 ×
216 Ø
217 Ù
218 Ú
219 Û
220 Ü
221 Ý
222 Þ
223 ß
224 à
225 á
226 â
227 ã
228 ä
229 å
230 æ
231 ç
232 è
233 é
234 ê
235 ë
236 ì
237 í
238 î
239 ï
240 ð
241 ñ
242 ò
243 ó
244 ô
245 õ
246 ö
247 ÷
248 ø
249 ù
250 ú
251 û
252 ü
253 ý
254 þ
255 ÿ

The Symbol :  represents those characters which are not supported by Microsoft Windows.

The Values 8, 9, 10, and 13 are converted into backspace, tab, linefeed, and carriage return characters, respectively.
They can not be graphically represented but, depending on the application, they can affect the visual display of text.

The values in the table are the Windows default.
where as, values in the ANSI character set above 127 are determined by the code page which is specific to the operating system.

++
Thanks and Regards
Meetu Choudhary
Founder: http://www.msdotnetmentor.com

Subscribe via email

Enter your email address:

Delivered by FeedBurner

MSDotnetMentor

MSDotnetMentor My Website http://msdotnetmentor.com