General discussion

Locked

Script Jscript in VB.net /asp.net app

By dmittri2000 ·
I want to write a JavaScript to make a textbox in my aspx web form to have have focus on page load.
I have the code on Javascript i.e
<script language="javascript">
function page_load()
{
document.Form1.txtUserName.focus()
}
</script>
I called the function on
<body onload="page_load()". But it had conflict with the VB codebehind in the aspx page.
Please tell/explain how to add Javascript to VB.NET web forms . Thank you

This conversation is currently closed to new comments.

0 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Back to Web Development Forum
0 total posts (Page 1 of 1)  

Related Discussions

Related Forums