- Dec 1, 2000
- 2,419
- 0
- 0
Okay, I've been doing ASP development for nearly ten years.
Lately, I've started doing some ASP.NET stuff.
Now I have a REALLLLLLLLLLY simple idea that I can't seem to implement, and so I'm here.
Scenerio:
User clicks button (and for the sake of argument, let's say it's very difficult to capture this particular click at the client-level).
My C# code handles button-click at the server level.
In the C# code, I'd like to add a textbox to the page, give it a certain background color, and add focus to it on the client side.
Now obviously I know how to change the background color of a textbox, and I know how to use the JavaScript focus() function.
But what I'm confused about is how to trigger a JavaScript function on the client side via some server-side code. Any ideas? (I can think of a number of hacks, but I'm imaginging there must be a clean way to do this.)
Lately, I've started doing some ASP.NET stuff.
Now I have a REALLLLLLLLLLY simple idea that I can't seem to implement, and so I'm here.
Scenerio:
User clicks button (and for the sake of argument, let's say it's very difficult to capture this particular click at the client-level).
My C# code handles button-click at the server level.
In the C# code, I'd like to add a textbox to the page, give it a certain background color, and add focus to it on the client side.
Now obviously I know how to change the background color of a textbox, and I know how to use the JavaScript focus() function.
But what I'm confused about is how to trigger a JavaScript function on the client side via some server-side code. Any ideas? (I can think of a number of hacks, but I'm imaginging there must be a clean way to do this.)