Ask a Question related to ASP.NET General, Design and Development.
-
Paul M. #1
.aspx page wont work!
Hi,
I am trying to run a simple asp .net page that has a button and a text
box on it. When the user clicks on the button the text box has some text put
into it. But it doesnt even fire the button click event when the button is
clicked on the text box remains unchanged.
Anyone got any ideas? Below is the code & html.
Thanks in advance
Paul M.
====================================
<%@ Page Language="vb" AutoEventWireup="false" Codebehind="WebForm2.aspx.vb"
Inherits="PLDB_WWW.WebForm2"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>WebForm2</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 MS_POSITIONING="GridLayout">
<form id="Form1" method="post" runat="server">
<INPUT id="Button1" style="Z-INDEX: 101; LEFT: 7px; WIDTH: 58px;
POSITION: absolute; TOP: 33px; HEIGHT: 186px" type="button" value="Button"
name="Button1" runat="server">
<asp:TextBox id="TextBox1" style="Z-INDEX: 102; LEFT: 157px; POSITION:
absolute; TOP: 39px" runat="server" Width="289px" Height="190px"
ForeColor="Black">wwwwwwww</asp:TextBox>
</form>
</body>
</HTML>
====================================
Public Class WebForm2
Inherits System.Web.UI.Page
Protected WithEvents TextBox1 As System.Web.UI.WebControls.TextBox
Protected WithEvents Button1 As System.Web.UI.HtmlControls.HtmlInputButton
#Region " Web Form Designer Generated Code "
'This call is required by the Web Form Designer.
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
End Sub
Private Sub Page_Init(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Init
'CODEGEN: This method call is required by the Web Form Designer
'Do not modify it using the code editor.
InitializeComponent()
End Sub
#End Region
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
End Sub
Private Sub Button1_ServerClick(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.ServerClick
TextBox1.Text = "Success"
End Sub
End Class
Paul M. Guest
-
SQL wont work
Can anyone suggest why this SQL wont work? Someone has suggested that I have a few " in the wrong place. I am missing the basic understanding... -
Accessing a aspx page using HttpWebRequest from another aspx page on the same webapp
Did you have any luck on this as I have the same problem. Maybe you can help me out of you solved your problem. -
Can anyone tell me why this wont work
Dear Stephen on stopMovie repeat with n in the windowlist -- forget n -- use this forget the windowlist end repeat end -
Can anyone tell me why this wont work??
I am trying to check and see if a field is posted or not, if not posted then assign $location which is a session variable to $location_other. If... -
how to interact client script within aspx page to other page functions, etc.? PLEASE!!!
Hi, I've spent all day trying to find some info on this...please help! I have an aspx page with an xmlDocument (not dataset/relational db) with... -
Showjumper #2
Re: .aspx page wont work!
try using the asp:button server control and see if it works
"Paul M." <paul@nospam.fsnet.co.uk> wrote in message
news:bggj0q$llg$1@news8.svr.pol.co.uk...put> Hi,
> I am trying to run a simple asp .net page that has a button and a text
> box on it. When the user clicks on the button the text box has some textCodebehind="WebForm2.aspx.vb"> into it. But it doesnt even fire the button click event when the button is
> clicked on the text box remains unchanged.
>
> Anyone got any ideas? Below is the code & html.
>
> Thanks in advance
> Paul M.
>
> ====================================
> <%@ Page Language="vb" AutoEventWireup="false"InitializeComponent()> Inherits="PLDB_WWW.WebForm2"%>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
> <HTML>
> <HEAD>
> <title>WebForm2</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 MS_POSITIONING="GridLayout">
> <form id="Form1" method="post" runat="server">
> <INPUT id="Button1" style="Z-INDEX: 101; LEFT: 7px; WIDTH: 58px;
> POSITION: absolute; TOP: 33px; HEIGHT: 186px" type="button" value="Button"
> name="Button1" runat="server">
> <asp:TextBox id="TextBox1" style="Z-INDEX: 102; LEFT: 157px; POSITION:
> absolute; TOP: 39px" runat="server" Width="289px" Height="190px"
> ForeColor="Black">wwwwwwww</asp:TextBox>
> </form>
> </body>
> </HTML>
> ====================================
> Public Class WebForm2
>
> Inherits System.Web.UI.Page
>
> Protected WithEvents TextBox1 As System.Web.UI.WebControls.TextBox
>
> Protected WithEvents Button1 As System.Web.UI.HtmlControls.HtmlInputButton
>
> #Region " Web Form Designer Generated Code "
>
> 'This call is required by the Web Form Designer.
>
> <System.Diagnostics.DebuggerStepThrough()> Private Sub>
> End Sub
>
> Private Sub Page_Init(ByVal sender As System.Object, ByVal e As
> System.EventArgs) Handles MyBase.Init
>
> 'CODEGEN: This method call is required by the Web Form Designer
>
> 'Do not modify it using the code editor.
>
> InitializeComponent()
>
> End Sub
>
> #End Region
>
> Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
> System.EventArgs) Handles MyBase.Load
>
> End Sub
>
> Private Sub Button1_ServerClick(ByVal sender As System.Object, ByVal e As
> System.EventArgs) Handles Button1.ServerClick
>
> TextBox1.Text = "Success"
>
> End Sub
>
> End Class
>
>
>
>
>
>
>
>
Showjumper Guest
-
John Knoop #3
Re: .aspx page wont work!
Make sure you have the "If Postback then exit sub" at the top of the
Page_Load procedure.
/john
"Paul M." <paul@nospam.fsnet.co.uk> wrote in message
news:bggj0q$llg$1@news8.svr.pol.co.uk...put> Hi,
> I am trying to run a simple asp .net page that has a button and a text
> box on it. When the user clicks on the button the text box has some textCodebehind="WebForm2.aspx.vb"> into it. But it doesnt even fire the button click event when the button is
> clicked on the text box remains unchanged.
>
> Anyone got any ideas? Below is the code & html.
>
> Thanks in advance
> Paul M.
>
> ====================================
> <%@ Page Language="vb" AutoEventWireup="false"InitializeComponent()> Inherits="PLDB_WWW.WebForm2"%>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
> <HTML>
> <HEAD>
> <title>WebForm2</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 MS_POSITIONING="GridLayout">
> <form id="Form1" method="post" runat="server">
> <INPUT id="Button1" style="Z-INDEX: 101; LEFT: 7px; WIDTH: 58px;
> POSITION: absolute; TOP: 33px; HEIGHT: 186px" type="button" value="Button"
> name="Button1" runat="server">
> <asp:TextBox id="TextBox1" style="Z-INDEX: 102; LEFT: 157px; POSITION:
> absolute; TOP: 39px" runat="server" Width="289px" Height="190px"
> ForeColor="Black">wwwwwwww</asp:TextBox>
> </form>
> </body>
> </HTML>
> ====================================
> Public Class WebForm2
>
> Inherits System.Web.UI.Page
>
> Protected WithEvents TextBox1 As System.Web.UI.WebControls.TextBox
>
> Protected WithEvents Button1 As System.Web.UI.HtmlControls.HtmlInputButton
>
> #Region " Web Form Designer Generated Code "
>
> 'This call is required by the Web Form Designer.
>
> <System.Diagnostics.DebuggerStepThrough()> Private Sub>
> End Sub
>
> Private Sub Page_Init(ByVal sender As System.Object, ByVal e As
> System.EventArgs) Handles MyBase.Init
>
> 'CODEGEN: This method call is required by the Web Form Designer
>
> 'Do not modify it using the code editor.
>
> InitializeComponent()
>
> End Sub
>
> #End Region
>
> Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
> System.EventArgs) Handles MyBase.Load
>
> End Sub
>
> Private Sub Button1_ServerClick(ByVal sender As System.Object, ByVal e As
> System.EventArgs) Handles Button1.ServerClick
>
> TextBox1.Text = "Success"
>
> End Sub
>
> End Class
>
>
>
>
>
>
>
>
John Knoop Guest



Reply With Quote

