How do you read the attachment once you get the file?

Discussion in 'ASP .Net' started by bthumber, Jul 6, 2010.

  1. bthumber

    bthumber Guest

    In my message attachment the user clicks on the message a new page is popped
    up. Question, How

    I get the contents of the message so the user can read it. Mind you the
    message is stored in a

    database file. I can see the ID on the next page, please see my code so far.

    private void SetAttachment(Go.Message message)
    {
    if(message.MessageAttachments != null)
    {
    IDictionaryEnumerator enumer = message.MessageAttachments.GetNumerator();
    while(enumer.movenext)
    {
    GO.myFile file = (GO.myFile)enumer.Value;
    Label hyper = new Label();
    hyper.Text = file.FileNM;
    hyper.Attributes.add("onclick", string.Format("return
    window.open('GetFile.aspx?ID=

    {0}');", file.FileID));
    PlaceHolder.controls.add(hyper);
    }
    }
     
    bthumber, Jul 6, 2010
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. jake
    Replies:
    6
    Views:
    510
    Marina
    Jul 7, 2004
  2. Gancy
    Replies:
    4
    Views:
    188
    Rasto Levrinc
    Feb 3, 2005
  3. Replies:
    2
    Views:
    111
  4. Replies:
    7
    Views:
    302
    Eric Sosman
    Aug 9, 2012
  5. clusardi2k
    Replies:
    7
    Views:
    635
    Eric Sosman
    Aug 9, 2012
Loading...

Share This Page