View Single Post
  #3 (permalink)  
Old 07-09-2007, 08:12 PM
HelloWorld's Avatar
HelloWorld HelloWorld is offline
PT Admin
Awards Showcase
Quality Tutorial 
Total Awards: 1
Join Date: Jun 2007
Location: In front of computer...
Posts: 1,119
iTrader: (0)
HelloWorld is a jewel in the roughHelloWorld is a jewel in the roughHelloWorld is a jewel in the rough
Icon11

Sorry for the confusions of this thread, this one will surely work!

Default.aspx
PHP Code:
<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %>

<!
DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<
html xmlns="http://www.w3.org/1999/xhtml" >
<
head runat="server">
    <
title>ASP.NET Web Test Form</title>
</
head>
<
body>
    <
form id="shoutForm" runat="server">
    <
div>
        <
asp:TextBox ID="name" runat="server"></asp:TextBox>
        <
asp:Button ID="submit" runat="server" OnClick="BtnOnClick" Text="SHOUT!" />
        <
p>
            <
asp:Label ID="result" runat="server"></asp:Label>
        </
p>
    </
div>
    </
form>
</
body>
</
html
Default.aspx.cs
PHP Code:
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class _Default System.Web.UI.Page 
{
    
protected void BtnOnClick(object senderEventArgs e)
    {
        
String value name.Text;
        
result.Text "HELLO! MY NAME IS " value;
    }

hopefully the code itself is self explanatory... if not, then ask questions... I'm not an expert at this, but I'm also learning ASP.NET

__________________

Digg this Post! Del.Icio.Us this Post! Technorati this Post! Furl this Post! Mister Wong this Post! Newsvine this Post! Spurl this Post! Reddit this Post! Netscape this Post!
Reply With Quote