Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx thread: type ahead - intellisense ?? Where ?


Message #1 by "Andrew Watts" <andrew.c.watts@b...> on Mon, 1 Oct 2001 23:01:04
Maybe I am missing something in my installation,

But when I enter on my aspx page  code like this:

I hoped to see a drop down of properties/method I would get 

for the Lable Output, as in Output.Text

void OnSendItin(Object sender, EventArgs e)

{

Output.Text="Received$ " + Amount.Text;

}



But I see nothing when



( BTW I also don't know why OnSendItin does not appear to fire  )



<asp:button id="Button1" style="Z-INDEX: 101; LEFT: 348px; POSITION: 

absolute; TOP: 32px" onclick="OnSendItin" Runat="server" Text="send it 

in"></asp:button>









<%@ Page language="c#" Codebehind="WebForm1.aspx.cs" 

AutoEventWireup="false" Inherits="wintelllect_1.WebForm1" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >

<HTML>

	<HEAD>

		<meta content="Microsoft Visual Studio 7.0" 

name="GENERATOR">

		<meta content="C#" name="CODE_LANGUAGE">

		<meta content="JavaScript (ECMAScript)" 

name="vs_defaultClientScript">

		<meta 

content="http://schemas.microsoft.com/intellisense/ie5" 

name="vs_targetSchema">

	</HEAD>

	<body MS_POSITIONING="GridLayout">

		<form id="Form1" method="post" runat="server">

			How much did you make last year ?

			<br>

			<asp:textbox id="Amount" 

Runat="server"></asp:textbox>

		</form>

		<asp:button id="Button1" style="Z-INDEX: 101; LEFT: 348px; 

POSITION: absolute; TOP: 32px" onclick="OnSendItin" Runat="server" 

Text="send it in"></asp:button>

		<asp:Label id="Output" style="Z-INDEX: 102; LEFT: 39px; 

POSITION: absolute; TOP: 133px" Runat="server"></asp:Label>

		<hr style="Z-INDEX: 103; LEFT: 8px; POSITION: absolute; 

TOP: 106px">

		<SCRIPT language="C#" id="Script1" runat="server">

void OnSendItin(Object sender, EventArgs e)

{



Output.Text="Received$ " + Amount.Text;

}

		</SCRIPT>

	</body>

</HTML>



Thanks
Message #2 by "David Higgins" <david@h...> on Tue, 2 Oct 2001 00:19:27 +0100
Andrew,



To get the intellisense you need to use the code behind as far as I am

aware it won't work in the <script></script> tags.



I rekon if you doubleclick on Button1 you will see a Button1_Click event

in your code behind.  If you remove the Codebehind directive in your

aspx page the event should fire.



Hope this helps



David









-----Original Message-----

From: Andrew Watts [mailto:andrew.c.watts@b...] 

Sent: 01 October 2001 23:01

To: ASP+

Subject: [aspx] type ahead - intellisense?? Where ?



Maybe I am missing something in my installation,

But when I enter on my aspx page  code like this:

I hoped to see a drop down of properties/method I would get 

for the Lable Output, as in Output.Text

void OnSendItin(Object sender, EventArgs e)

{

Output.Text="Received$ " + Amount.Text;

}



But I see nothing when



( BTW I also don't know why OnSendItin does not appear to fire  )



<asp:button id="Button1" style="Z-INDEX: 101; LEFT: 348px; POSITION: 

absolute; TOP: 32px" onclick="OnSendItin" Runat="server" Text="send it 

in"></asp:button>









<%@ Page language="c#" Codebehind="WebForm1.aspx.cs" 

AutoEventWireup="false" Inherits="wintelllect_1.WebForm1" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >

<HTML>

	<HEAD>

		<meta content="Microsoft Visual Studio 7.0" 

name="GENERATOR">

		<meta content="C#" name="CODE_LANGUAGE">

		<meta content="JavaScript (ECMAScript)" 

name="vs_defaultClientScript">

		<meta 

content="http://schemas.microsoft.com/intellisense/ie5" 

name="vs_targetSchema">

	</HEAD>

	<body MS_POSITIONING="GridLayout">

		<form id="Form1" method="post" runat="server">

			How much did you make last year ?

			<br>

			<asp:textbox id="Amount" 

Runat="server"></asp:textbox>

		</form>

		<asp:button id="Button1" style="Z-INDEX: 101; LEFT:

348px; 

POSITION: absolute; TOP: 32px" onclick="OnSendItin" Runat="server" 

Text="send it in"></asp:button>

		<asp:Label id="Output" style="Z-INDEX: 102; LEFT: 39px; 

POSITION: absolute; TOP: 133px" Runat="server"></asp:Label>

		<hr style="Z-INDEX: 103; LEFT: 8px; POSITION: absolute; 

TOP: 106px">

		<SCRIPT language="C#" id="Script1" runat="server">

void OnSendItin(Object sender, EventArgs e)

{



Output.Text="Received$ " + Amount.Text;

}

		</SCRIPT>

	</body>

</HTML>



Thanks



Message #3 by "Andrew Watts" <andrew.c.watts@b...> on Tue, 2 Oct 2001 06:30:14
David,



Thanks - I needed to do move the button into the form tag - should have 

seen that earlier...

<asp:button id="Button1"  onclick="OnSendItin" Runat="server" Text="send 

it in"></asp:button>



I did as you suggested and used the code behind to get type ahead- and 

then commented out the body of the function in the HTML source as follows, 

but added the logic in the code behind.  



void OnSendItin(Object sender, EventArgs e)

{

// see code behind  Output.Text="Received$ " + Amount.Text;

}





Thanks Andrew





> Andrew,

> 

> To get the intellisense you need to use the code behind as far as I am

> aware it won't work in the <script></script> tags.

> 

> I rekon if you doubleclick on Button1 you will see a Button1_Click event

> in your code behind.  If you remove the Codebehind directive in your

> aspx page the event should fire.

> 

> Hope this helps

> 

> David

> 

> 

> 

> 

> -----Original Message-----

> From: Andrew Watts [mailto:andrew.c.watts@b...] 

> Sent: 01 October 2001 23:01

> To: ASP+

> Subject: [aspx] type ahead - intellisense?? Where ?

> 

> Maybe I am missing something in my installation,

> But when I enter on my aspx page  code like this:

> I hoped to see a drop down of properties/method I would get 

> for the Lable Output, as in Output.Text

> void OnSendItin(Object sender, EventArgs e)

> {

> Output.Text="Received$ " + Amount.Text;

> }

> 

> But I see nothing when

> 

> ( BTW I also don't know why OnSendItin does not appear to fire  )

> 

> <asp:button id="Button1" style="Z-INDEX: 101; LEFT: 348px; POSITION: 

> absolute; TOP: 32px" onclick="OnSendItin" Runat="server" Text="send it 

> in"></asp:button>

> 

> 

> 

> 

> <%@ Page language="c#" Codebehind="WebForm1.aspx.cs" 

> AutoEventWireup="false" Inherits="wintelllect_1.WebForm1" %>

> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >

> <HTML>

> 	<HEAD>

> 		<meta content="Microsoft Visual Studio 7.0" 

> name="GENERATOR">

> 		<meta content="C#" name="CODE_LANGUAGE">

> 		<meta content="JavaScript (ECMAScript)" 

> name="vs_defaultClientScript">

> 		<meta 

> content="http://schemas.microsoft.com/intellisense/ie5" 

> name="vs_targetSchema">

> 	</HEAD>

> 	<body MS_POSITIONING="GridLayout">

> 		<form id="Form1" method="post" runat="server">

> 			How much did you make last year ?

> 			<br>

> 			<asp:textbox id="Amount" 

> Runat="server"></asp:textbox>

> 		</form>

> 		<asp:button id="Button1" style="Z-INDEX: 101; LEFT:

> 348px; 

> POSITION: absolute; TOP: 32px" onclick="OnSendItin" Runat="server" 

> Text="send it in"></asp:button>

> 		<asp:Label id="Output" style="Z-INDEX: 102; LEFT: 39px; 

> POSITION: absolute; TOP: 133px" Runat="server"></asp:Label>

> 		<hr style="Z-INDEX: 103; LEFT: 8px; POSITION: absolute; 

> TOP: 106px">

> 		<SCRIPT language="C#" id="Script1" runat="server">

> void OnSendItin(Object sender, EventArgs e)

> {

> 

> Output.Text="Received$ " + Amount.Text;

> }

> 		</SCRIPT>

> 	</body>

> </HTML>

> 

> Thanks

> 


  Return to Index