Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Creating a default button
Message
General information
Forum:
ASP.NET
Category:
Web forms
Miscellaneous
Thread ID:
00706243
Message ID:
00706394
Views:
25
Thanks for the response. Now all I have to do figure out how to impliment java into the page in the first place :) So say I have the following very simple VS7 generated html form. How would I use what you have told me?
<%@ Page Language="vb" AutoEventWireup="false" Codebehind="WebForm1.aspx.vb" Inherits="WebControlTest.WebForm1"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
	<HEAD>
		<title>WebForm1</title>
		<meta name="GENERATOR" content="Microsoft Visual Studio.NET 7.0">
		<meta name="CODE_LANGUAGE" content="Visual Basic 7.0">
		<meta name="vs_defaultClientScript" content="JavaScript">
		<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
	</HEAD>
	<body>
		<form id="Form1" method="post" runat="server">
			<asp:Button id="Button1"  runat="server" Text="Button" Width="141px" Height="23px"></asp:Button>
			<asp:Button id="Button2"  runat="server" Text="Button" Width="141px" Height="23px"></asp:Button>
			<asp:TextBox id="TextBox1" runat="server" Width="107px"></asp:TextBox>
		</form>
	</body>
</HTML>
>Joe - this was in response to another thread - sorry for the misplaced response.
>
>Joe,
>
>I just use Javascript in the Body Tag with OnLoad loaded with where I want to go. Be aware that if you set your focus to a control that is not enabled you'll have trouble. Here is how I handle it (but I'm always open to new ideas).
>
>OnLoad="if(document.forms[0].elements[0].isDisabled)document.forms[0].elements[1].focus(); else document.forms[0].elements[0].focus();"
>
>Plus you can add all kinds of JavaScript by adding it during processing. Look up 'Client-Side functionality in a Server Control' in the .NET help and check out Page.RegisterClientScriptBlock();
>
>HTH,
>Doug
~Joe Johnston USA

"If ye love wealth better than liberty, the tranquility of servitude better than the animated contest of freedom, go home from us in peace. We ask not your counsel or arms. Crouch down and lick the hands which feed you. May your chains set lightly upon you, and may posterity forget that ye were our countrymen."
~Samuel Adams

Previous
Next
Reply
Map
View

Click here to load this message in the networking platform