Results 1 to 16 of 16

Thread: My First Web Form

  1. #1

    Thread Starter
    New Member
    Join Date
    May 2004
    Location
    Manchester England
    Posts
    11

    Unhappy My First Web Form

    Hi
    I am a beginner with web forms and I have done a simple form with a button and a label. when I run the form the button does not appear and the label is not formatted and any coed I try to add does not work.

    Anyone tell me why?
    Thanks
    Neal

  2. #2
    Frenzied Member dj4uk's Avatar
    Join Date
    Aug 2002
    Location
    Birmingham, UK Lobotomies: 3
    Posts
    1,131
    Post your code we aren't psychic!

    DJ

  3. #3
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: My First Web Form

    Originally posted by erics44
    and any coed I try to add does not work.
    Maybe that's the problem, you're adding your female classmates to your form.


    Or did you mean code?

  4. #4

    Thread Starter
    New Member
    Join Date
    May 2004
    Location
    Manchester England
    Posts
    11
    I could write any code and it wouldnt work, for example

    Private Sub Page_Load (........

    MsgBox("Hello")

    End Sub

    and none of my controls will format.

    dunno why yet, do you?

    p.s. I didnt get the 'coed' joke
    Thanks
    Neal

  5. #5
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170
    Originally posted by erics44
    I could write any code and it wouldnt work, for example

    Private Sub Page_Load (........

    MsgBox("Hello")

    End Sub

    and none of my controls will format.

    dunno why yet, do you?

    p.s. I didnt get the 'coed' joke
    MsgBox won't work on ASP.NET pages.

    Coeds... uhm... ok, never mind, it was a lame joke anyways.

  6. #6

    Thread Starter
    New Member
    Join Date
    May 2004
    Location
    Manchester England
    Posts
    11
    The Msgbox thing was just an example and i dont know if i actually tried that, but i didnt know that they didnt work even if i had so thanks.

    do you know what i mean?
    Thanks
    Neal

  7. #7
    Frenzied Member Fishcake's Avatar
    Join Date
    Feb 2001
    Location
    Derby, UK
    Posts
    1,092
    Do you have the .net framework installed? Can you post your code please?

  8. #8

    Thread Starter
    New Member
    Join Date
    May 2004
    Location
    Manchester England
    Posts
    11
    yep the .net framework is installed

    unfortunately I am not at my desk at work until next tuesday so i cant access any of my work to post any code, sorry. But as soon as I am I will.

    Any ideas why my controls wont format? is this normal with web forms? Perhaps it is just a property of the form I have not set properly or something?

    thanks for taking the time to have a look at this for me.
    Thanks
    Neal

  9. #9
    Frenzied Member dj4uk's Avatar
    Join Date
    Aug 2002
    Location
    Birmingham, UK Lobotomies: 3
    Posts
    1,131
    It's very difficult to say without seeing the code - it could be a million things.

    DJ

  10. #10

    Thread Starter
    New Member
    Join Date
    May 2004
    Location
    Manchester England
    Posts
    11
    there is no code, my controls wont format. I can change the colour, font type and weight of a label, for instance, but it shows up as white with the original font in the browser.

    It also moves all of my controls back yo the tope left hand side of the form. Perhaps this is supposed to happen, i dont know?
    Thanks
    Neal

  11. #11
    Hyperactive Member
    Join Date
    Jun 2002
    Location
    midewest u.s.
    Posts
    275

    Same Problem

    Hey guys I am having the same problem as him. I try Response.Write("test") and it won't work. I have tried it in all sorts of different places. Keep in mind I have never used any ASP before and really not anything dealing with the web... I just thought I would try and learn a bit and now im rather confused. I have VS.NET 2002, so framework is installed and here is the code I tried.


    <%@ Page language="VB" AutoEventWireup="false" Codebehind="WebForm1.aspx.vb" Inherits="ASPTest.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 MS_POSITIONING="GridLayout">
    <form id="Form1" method="post" runat="server">
    <asp:Button id="Button1" runat="server" Text="Button" Width="177px" Height="33px"></asp:Button></P>
    <% Response.Write("Test") %>
    </form>
    </body>
    </HTML>



    I can type text under the <% %> and it shows up fine.... It just seems that no asp works at all... If theres something im doing terribly wrong please let me know.. And thanks a bunch

  12. #12

    Thread Starter
    New Member
    Join Date
    May 2004
    Location
    Manchester England
    Posts
    11
    thank god i am not alone
    Thanks
    Neal

  13. #13
    Fanatic Member davebat's Avatar
    Join Date
    Dec 2002
    Posts
    727
    do you have asp installed on the server? and your page does have a .asp extension, right?

  14. #14
    Frenzied Member Fishcake's Avatar
    Join Date
    Feb 2001
    Location
    Derby, UK
    Posts
    1,092
    Tool : does your <asp:button> render? can you see the button on the webform when it is running?

  15. #15

    Thread Starter
    New Member
    Join Date
    May 2004
    Location
    Manchester England
    Posts
    11
    dave it is likely that asp is not installed on the server, thanks. as much as it hurts to accept help from a city fan

    i cant really try any controls yet because i am in sweden but as soon as i am back at my desk i will, cheers
    Thanks
    Neal

  16. #16
    Hyperactive Member
    Join Date
    Jun 2002
    Location
    midewest u.s.
    Posts
    275

    figured it out

    ... ok i just typed this and clicked submit but it said i wasn't logged in so lets hope it doesn't show up twice....

    Anyway thankfully I work at a college. I ran down the programming director and told him the problem.. I guess there is a file that needs to be ran

    C:\WINDOWS\Microsoft.NET\Framework\v1.0.3705\aspnet_regiis.exe -i

    That is where mine is located... the folders might be different depending on which framework versions you have installed... or which one you wish to use. the -i I guess is a paramater to install that. Just copy and paste that in the start->run and it will install it all for you and everything should work fine.. It did for me anyhow. Good luck and hopefully this will help out anyone else new to asp and with a similiar situation.

    Thank you all for replying and best of luck

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width