Change the Cursor
-
Hi All, In web based application, ASP.Net + C#. I want to do like this protected void Function() { this.cursor = Cursor. Wait; /// do some operations this.cursor = Cursor.deafult; } The above code will work for Window based application, but i want to implement it in Web Based. Anybody please help me... Kannapiran S
-
Hi All, In web based application, ASP.Net + C#. I want to do like this protected void Function() { this.cursor = Cursor. Wait; /// do some operations this.cursor = Cursor.deafult; } The above code will work for Window based application, but i want to implement it in Web Based. Anybody please help me... Kannapiran S
-
you need to use javascript *something* like this
function LongTask(obj)
{
obj.style.cursor = "HourGlass";/* logic in here */
obj.style.cursor = "Default";
}g00fy
protected void cmdBtn_Click(object sender, EventArgs e) { WaitCursor(); //... some operations .... DefaultCursor(); } protected void WaitCursor() { // JavaScript function for Wait Cursor. string strWaitCursor = "" + "document.body.style.cursor = 'wait';" + ""; // Add the JavaScript code to the page. ClientScript.RegisterStartupScript(this.GetType(), "WaitCursor", strWaitCursor); } protected void DefaultCursor() { // JavaScript function for Default Cursor. string strDefaultCursor = "" + "document.body.style.cursor = 'default';" + ""; // Add the JavaScript code to the page. ClientScript.RegisterStartupScript(this.GetType(), "DefaultCursor", strDefaultCursor); } Will it work???? Kannapiran S
-
Hi All, In web based application, ASP.Net + C#. I want to do like this protected void Function() { this.cursor = Cursor. Wait; /// do some operations this.cursor = Cursor.deafult; } The above code will work for Window based application, but i want to implement it in Web Based. Anybody please help me... Kannapiran S
Doesn't CSS have a cursor function? Infact i know it does: cursor: auto (uses what is set by user) cursor: crosshair (should produce a cross) cursor: default (cursor remains as it is) cursor: e-resize (arrow pointing right) cursor: hand (the traditional pointing hand) cursor: help (a Question Mark should appear) cursor: move (a cross with arrows on the tips) cursor: n-resize (an arrow pointing north or up) cursor: ne-resize (an arrow pointing northeast) cursor: nw-resize (an arrow pointing northwest) cursor: pointer (that hand again) cursor: s-resize (an arrow pointing south or down) cursor: se-resize (an arrow pointing southeast) cursor: sw-resize (an arrow pointing southwest) cursor: text (looks like the end of an I-beam) cursor: w-resize (an arrow pointing west) cursor: wait (an hourglass) There you go. Use Javascript to change the style of the elemnet that the user's mouse is in. I would suggest a
that surrounds the whole page and allows you to change the cursor without affecting the other CSS rules you have inplace!
Brad Australian Have you tried Rebooting it?