Click here to Skip to main content
15,894,460 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Hey guys,

I’m new – to programming and to this community. Originally, I came here looking at a guide for webforms, but it didn’t answer the questions that I had (or I didn’t interpret it very well!).
So here’s my situation: I’m using C# to create a form. The form will exist as a single page on a large website and will be used to upload documents to the server. The file for the form should be in .aspx, I will be provided the sourcecode, but have nothing now, and I’m using Microsoft Visual Studio 11 Express Beta for Web. The form should have data input areas (text boxes) for the Document Code, Document Name, Parent, and Description. It will also have buttons, allowing the user to Save, Begin Again, Attach Document, Delete Document, and Cancel.
Sound easy? I hope so, because it doesn’t to me –but maybe it will to me in a few days …or hours.

What code do I use to have the form data and the file uploaded to the server when the “Save” button is selected?
What’s the difference between the “Delete Document” button and the “Begin Again” button (assuming that a new page comes up anyway when a file has been completely uploaded).
Should I really be creating this as a website page or should I use a webform instead?

Any direct help, links to tutorials or links to ebooks would be appreciated beyond explanation. The (very skeletal!) code that I've done so far is below. THANKS!!

SilentStone



XML
<%@ Page Language="C#" %>

<!DOCTYPE html>

<script runat="server">

    protected void TextBox1_TextChanged(object sender, EventArgs e)
    {

    }

    protected void Button3_Click(object sender, EventArgs e)
    {

    }

    protected void Button2_Click(object sender, EventArgs e)
    {

    }
</script>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <style type="text/css">
        .newStyle1 {
            vertical-align: top;
        }
        .newStyle2 {
            vertical-align: top;
        }
        .newStyle3 {
            background-color: #920300;
            display: inline-block;
            line-height: 3px;
            border: thin solid #920300;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div>

    </div>
    <asp:Panel ID="Panel1" runat="server" BorderColor="#FFFF66" BorderStyle="Solid"
        BorderWidth="3px" Width="800px" Wrap="False">
        <br />
        <br />
        <br />
        <strong>&nbsp; Document Code&nbsp;&nbsp; </strong>:
        <asp:TextBox ID="TextBox2" runat="server" style="margin-right: 0px"
            Width="506px" MaxLength="50"></asp:TextBox>
        <br />
        <br />
        &nbsp; <strong>Document Name &nbsp;</strong>:&nbsp;<asp:TextBox ID="TextBox3" runat="server"
            Height="16px" MaxLength="100" Width="177px"></asp:TextBox>
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <br />
        <br />
        &nbsp; Parent&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :&nbsp;<asp:TextBox ID="TextBox6" runat="server"
            style="margin-left: 0px" Width="148px"></asp:TextBox>
        &nbsp;
        <br />
        <br />
        &nbsp; <span class="newStyle1">Description&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>&nbsp;<span class="newStyle2">:
        </span>
        <asp:TextBox ID="TextBox5" runat="server" Height="16px" Width="520px"></asp:TextBox>
        <br />
        &nbsp;
        <br />
        <br />
        <asp:Button ID="Button1" runat="server" Text="Save" />
        &nbsp;
        <asp:Button ID="Button2" runat="server" OnClick="Button2_Click"
            Text="Begin Again" />
        &nbsp;
        <asp:Button ID="Button3" runat="server" OnClick="Button3_Click"
            Text="Attach New Document" />
        &nbsp;
        <asp:Button ID="Button4" runat="server" Text="Delete Document" />
        &nbsp;
        <asp:Button ID="Button5" runat="server" Text="Cancel" />
        <br />
    </asp:Panel>
    </form>
</body>
</html>
Posted

1 solution

Hi,What is the meaning of & nbsp ?
 
Share this answer
 
v2
Comments
[no name] 17-Jun-12 22:41pm    
Perhaps you can explain how this is a solution to the question.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900