Jump to content

aic007

Members
  • Posts

    84
  • Joined

  • Last visited

Posts posted by aic007

  1. Im back again with stupid questions :) I use this code;

      protected void Button1_Click(object sender, EventArgs e)    {        Console.WriteLine("Chapter 1 example 1: Hello World");        // step 1: creation of a document-object        Document document = new Document();        try        {            // step 2:            // we create a writer that listens to the document            // and directs a PDF-stream to a file            PdfWriter.GetInstance(document, new FileStream("Chap0101.pdf", FileMode.Create));            // step 3: we open the document            document.Open();            // step 4: we Add a paragraph to the document            document.Add(new Paragraph("Hello World"));        }        catch (DocumentException de)        {            Console.Error.WriteLine(de.Message);        }        catch (IOException ioe)        {            Console.Error.WriteLine(ioe.Message);        }        // step 5: we close the document        document.Close();    }

    and when I click on the button, nothing happens.. It is supposed to generate a pdf file, but nothing happens. Any1 have any idea what I am doing wrong ?I am using code from this site;http://itextsharp.sourceforge.net/tutorial/ch01.htmlplz help me

  2. It's not that I'am lazy or something like that, but I have googled alot and studied alot without being able to understand what to do in order to generate a pdf file that contains information that user has typed in a .aspx form. If someone could help me a bit with a good and detailed example I would be very thankful.

  3. Hi.I did a bit of googling, but could not find what I was looking for. I was wondering if somebody could help me with some examples of customized printing ? Is it possible at all ? Can I take input from textboxes and then put it in my own pdf document for instance and then print it out ?

  4. Hi.I have 4 textboxes, nr. 1 is set to visible by default and the other 3 are set to not visible by default. I want my program to work like this, if I choose 2 in my dropdown list, I want 2 textboxes to be visible. If I choose 3 from the dropdown list, I want 3 textboxes to be visible and so on... This is my code ( just using Default.aspx and Default.aspx.cs - will change the names when it works );Default.aspx

                           <tr>                    <td>                    </td>                    <td style="width: 3px">                        <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>                        <asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>                        <asp:TextBox ID="TextBox3" runat="server" Visible="False"></asp:TextBox>                        <asp:TextBox ID="TextBox4" runat="server" Visible="False"></asp:TextBox></td>                    <td style="width: 3px">                        <asp:DropDownList ID="DropDownList1" runat="server" OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged">                            <asp:ListItem Selected="True">1</asp:ListItem>                            <asp:ListItem>2</asp:ListItem>                            <asp:ListItem>3</asp:ListItem>                            <asp:ListItem>4</asp:ListItem>                            <asp:ListItem>5</asp:ListItem>                            <asp:ListItem>6</asp:ListItem>                        </asp:DropDownList></td>                </tr>

    Default.aspx.cs ( tried a couple of different things here, nothing works )

     protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)    {        if (DropDownList1.SelectedIndex.Equals(2))        {            TextBox2.Visible = true;        }        else if (DropDownList1.SelectedValue.Equals("3"))        {            TextBox2.Visible = true;            TextBox3.Visible = true;        }        else if (DropDownList1.SelectedItem.Equals("4"))        {            TextBox2.Visible = true;            TextBox3.Visible = true;            TextBox4.Visible = true;                   }    }

    Nothing happens when I choose something from the dropdownlist. Please help me. Are there any better ways to this, then please do inform me.Best regards.

  5. Thanx mateI have managed to connect to database and retrieve information. Now I have to, as you also said, find a way to retrieve the data the way I want. Open for all suggestions :)

  6. Hi. Thanx for replying. I have a database to store employee information. I also know how to connect to database and get data from database in a text box. What I still don't know is how to get other tetxfields to be filled automaticly when i have typed the employee nr and pressed enter.Googled a lot, can't find any examples that can help me :)

  7. Hi.I'm very new with ASP (and C# also), so I thought I could ask some experts here for help :) I was wondering if sombody here could tell me what to do in order to get one or more textboxes to retrieve information automaticly ?For instance, if I type in the employee nr, I want the name and adress textboxes to be filled in automaticly.I really don't know how to do it. Can somebody plzz help me or show me some examples ?

  8. Hi.I'm very new with ASP.NET and C#, so I thought I could ask some experts here for help :) I was wondering if sombody here could tell me what to do in order to get one or more textboxes to retrieve information automaticly ?For instance, if I type in the employee nr, I want the name and adress textboxes to be filled in automaticly. I really don't know how to do it. Can somebody plzz help me or show me some examples ?

×
×
  • Create New...