Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.0 and 1.1 Basics
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old April 20th, 2005, 01:22 PM
sli sli is offline
Registered User
 
Join Date: Apr 2005
Location: Oslo, , Norway.
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to sli
Default Problem with holidaypage.aspx (need help)

hi, i have problem with the holidaypage.aspx here is my code please tell me whats the wrong with it is.. please tell me thnx..

 
Quote:
quote:
<html>
<head>
  <title>Holiday page</title>
</head>
<body>
  <form action="holidayresponse.aspx" method="post">
    <h1>Feiertag Holidays</h1>
  Please enter your details here,
  <br /><br />
  Name:<asp:textbox id="Fullname" runat="server" />
  <br /><br />
  Address:<asp:textbox id="Address" rows="5" textmode="multiline" runat="server" />
  <br /><br />
  ************ -
  <asp:radiobuttonlist id="************" runat="server">
     <asp:listitem value="Male" />
     <asp:listitem value="Female" />
  </asp:radiobuttonlist>
  Please select the destination you would like details on:
  <asp:dropdownlist id="Destination" runat="server">
    <asp:listitem value="Madrid" />
    <asp:listitem value="Barcelona" />
    <asp:listitem value="Lisbon" />
    <asp:listitem value="Oslo" />
    <asp:listitem value="Parague" />
  </asp:dropdownlist>
  <br /><br />
    <input type="Submit">
  <input type="Reset">
 </form>
</body>
</html>
Quote:
quote:
  #2 (permalink)  
Old April 20th, 2005, 03:07 PM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

sli,

We are not here to proof read your code. You need to ask a specific question regarding the behavior you are experiencing. Please describe what you expect to see and what the "problem" is that you are having but haven't described. Simply *telling* us to "tell you what's wrong" isn't going to get you very far.
  #3 (permalink)  
Old April 21st, 2005, 03:54 AM
Friend of Wrox
 
Join Date: Jun 2004
Location: Chennai, Tamil Nadu, India.
Posts: 449
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to r_ganesh76
Default

at the first site itself it can be noticed that this aspx will not run since your form doesnt have a runat="server" attribute set. You cannot place aspx controls on a form without runat="server".

As Peter rightly pointed out you should state exactly what your problem is other that asking others for any problem

Regards
Ganesh
  #4 (permalink)  
Old April 21st, 2005, 04:20 AM
sli sli is offline
Registered User
 
Join Date: Apr 2005
Location: Oslo, , Norway.
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to sli
Default

OK!

in book the are

<form action="holidayresponse.aspx" method="post">

but i try with runat="server" its now ok BUT..
when i Submit it dont want to continue. also it dont want to go to holidayresponse.aspx page.

  #5 (permalink)  
Old April 21st, 2005, 04:51 AM
Friend of Wrox
 
Join Date: Jun 2004
Location: Chennai, Tamil Nadu, India.
Posts: 449
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to r_ganesh76
Default

There are may new ways of coding in ASP.Net. You dont need to do the same way as your asp pages. ASP.net has a full set of controls other than the html contorls. You dont need to use input type="Submit" to submit your page. You can use asP:button insted. You can then code the click event of the button.

It is all very simple when compared to the ASP coding.

Hope this script helps.

Code:
<%@ Page Language="C#" %>
<script runat="server">
    void Button1_Click(object sender, EventArgs e)
    {
        Response.Write(Fullname.Text);
        // Your code goes here
    }

</script>
<html>
<head>
    <title>Holiday page</title>
</head>
<body>
    <form method="post" runat="server">
        <h1>Feiertag Holidays
        </h1>
        Please enter your details here,
        <br />
        <br />
        Name:<asp:textbox id="Fullname" runat="server"></asp:textbox>
        <br />
        <br />
        Address:<asp:textbox id="Address" runat="server" rows="5" textmode="multiline"></asp:textbox>
        <br />
        <br />
        ************ -
        <asp:radiobuttonlist id="************" runat="server">
            <asp:listitem value="Male" />
            <asp:listitem value="Female" />
        </asp:radiobuttonlist>
        Please select the destination you would like details on:
        <asp:dropdownlist id="Destination" runat="server">
            <asp:listitem value="Madrid" />
            <asp:listitem value="Barcelona" />
            <asp:listitem value="Lisbon" />
            <asp:listitem value="Oslo" />
            <asp:listitem value="Parague" />
        </asp:dropdownlist>
        <br />
        <br />
        <asp:Button id="Button1" onclick="Button1_Click" runat="server" Text="Submit Query"></asp:Button>
        &nbsp;<input type="reset" value="Reset" />
    </form>
</body>
</html>
Regards
Ganesh
  #6 (permalink)  
Old April 21st, 2005, 08:47 AM
sli sli is offline
Registered User
 
Join Date: Apr 2005
Location: Oslo, , Norway.
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to sli
Default

Hi. im not using C#. i have "ASP.NET using VB.NET" wich code do i have to add there you havet typed
{
        Response.Write(Fullname.Text);
        // Your code goes here
    }

i have try to add the holidayresponse.aspx code but i dont work!

sli
  #7 (permalink)  
Old April 21st, 2005, 11:47 PM
Friend of Wrox
 
Join Date: Jun 2004
Location: Chennai, Tamil Nadu, India.
Posts: 449
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to r_ganesh76
Default

Here is ur VB Code
Code:
Sub Button1_Click(sender As Object, e As EventArgs)
     Response.Write FullName.Text
'    Your Code goes here
End Sub
Regards
Ganesh
  #8 (permalink)  
Old April 21st, 2005, 11:49 PM
Friend of Wrox
 
Join Date: Jun 2004
Location: Chennai, Tamil Nadu, India.
Posts: 449
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to r_ganesh76
Default

Quote:
quote:
i have try to add the holidayresponse.aspx code but i dont work!
What code did you try to add?

Regards
Ganesh
  #9 (permalink)  
Old April 22nd, 2005, 11:43 AM
sli sli is offline
Registered User
 
Join Date: Apr 2005
Location: Oslo, , Norway.
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to sli
Default

Quote:
quote:Originally posted by r_ganesh76
 
Quote:
quote:
Quote:
i have try to add the holidayresponse.aspx code but i dont work!
What code did you try to add?

Regards
Ganesh
This code:
<script runat="server" language="vb">
  Sub Page_Load()
   Response.Write ("<b>Name:</b> " + Request.Form("FullName") + "<br />")
   Response.Write ("<b>Address:</b> " + Request.Form("Address") + "<br />")
   Response.Write ("<b>************:</b> " + Request.Form("************") + "<br />")
   Response.Write ("<b>Destination:</b> " + Request.Form("Destination") + "<br />")
</script>
<html>
<head>
  <title>Holiday page</title>
</head>
<body>
  <br /><br />
  These details have been entered into our database, you should receive a
confirmation email from us shortly.
<br /><br />
</body>
</html>

You say: Sub Button1_Click(sender As Object, e As EventArgs)
     Response.Write FullName.Text
' Your Code goes here
End Sub

Your Code goes here? Wich code do you mean?

sli
  #10 (permalink)  
Old April 22nd, 2005, 11:42 PM
Friend of Wrox
 
Join Date: Jun 2004
Location: Chennai, Tamil Nadu, India.
Posts: 449
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to r_ganesh76
Default

what ever you want to do on the button click. I just wrote a sample code for you. The logic you need to implement

Regards
Ganesh
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with Register.aspx Big2 BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 8 August 14th, 2008 08:44 AM
A Problem of punctual.aspx Rozen BOOK: Beginning ASP.NET 1.0 2 March 1st, 2006 04:17 AM
News.aspx problem motor1 BOOK: ASP.NET Website Programming Problem-Design-Solution 1 December 15th, 2003 10:58 PM
ch03, holidaypage ernstG BOOK: Beginning ASP.NET 1.0 4 November 8th, 2003 03:39 AM



All times are GMT -4. The time now is 01:44 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.