Sending the state of a page via email

Discussion in 'ASP .Net' started by m.a, Apr 28, 2008.

  1. m.a

    m.a Guest

    Hello,

    I have a page with several control on it. Each control could have several
    states. I want to send an email that has a link in it and when user click on
    that link, it redirected to my site and go that specific page and set the
    state of all controls in a way that it displayed in the way that I wanted.
    How can I do this?



    Regards
    m.a, Apr 28, 2008
    #1
    1. Advertising

  2. One way would be to use query strings at the end of the URL you send to your
    users in the email.

    yourUrl?Control1State=nnnn&Control2State=nnnn

    in your controls, you can make use of the request.params["Controle1State"]
    to decide how to manipulate the state of your controls.

    Hope that helps.



    "m.a" <> wrote in message
    news:2IjRj.133989$2...
    > Hello,
    >
    > I have a page with several control on it. Each control could have
    > several states. I want to send an email that has a link in it and when
    > user click on that link, it redirected to my site and go that specific
    > page and set the state of all controls in a way that it displayed in the
    > way that I wanted. How can I do this?
    >
    >
    >
    > Regards
    >
    >
    >
    >
    Microsoft Newsserver, Apr 28, 2008
    #2
    1. Advertising

  3. m.a

    m.a Guest

    "Mark Rae [MVP]" <> wrote in message
    news:%...
    > "m.a" <> wrote in message
    > news:2IjRj.133989$2...
    >
    >> I have a page with several control on it. Each control could have
    >> several states. I want to send an email that has a link in it and when
    >> user click on that link, it redirected to my site and go that specific
    >> page and set the state of all controls in a way that it displayed in the
    >> way that I wanted. How can I do this?

    >
    > A simple way to do this, as has already been suggested, would be to use a
    > QueryString.
    >
    > However, bear in mind a couple of things:
    >
    > 1) This would allow the recipient of the email to modify the QueryString,
    > which may mean that the controls are updated in an invalid way for the
    > particular recipient. E.g., if a URL looked like this:
    >
    > http://www.mysite.com/sales.aspx?admin=false
    >
    > it wouldn't take very much working out that changing admin=false to
    > admin=true might allow people to see parts of the site which they should
    > not see... OK, that's a bit of an extreme example, but you get the idea...
    >
    > 2) More and more people are configuring their email client not to display
    > hyperlinks in emails, or even to filter out any email which contains
    > hyperlinks...
    >
    >
    > --
    > Mark Rae
    > ASP.NET MVP
    > http://www.markrae.net


    Thanks for your reply,
    So what do you sugest? I want to inform somebody that he should look at a
    page. what is the best way?

    Regards
    m.a, Apr 28, 2008
    #3
  4. m.a

    Paul Shapiro Guest

    You could save the user's state in a db and restore those settings when the
    user logs back onto the site. That way the email just has to include the
    standard link to the site.

    "m.a" <> wrote in message
    news:3ZlRj.135030$2...
    >
    > "Mark Rae [MVP]" <> wrote in message
    > news:%...
    >> "m.a" <> wrote in message
    >> news:2IjRj.133989$2...
    >>
    >>> I have a page with several control on it. Each control could have
    >>> several states. I want to send an email that has a link in it and when
    >>> user click on that link, it redirected to my site and go that specific
    >>> page and set the state of all controls in a way that it displayed in the
    >>> way that I wanted. How can I do this?

    >>
    >> A simple way to do this, as has already been suggested, would be to use a
    >> QueryString.
    >>
    >> However, bear in mind a couple of things:
    >>
    >> 1) This would allow the recipient of the email to modify the QueryString,
    >> which may mean that the controls are updated in an invalid way for the
    >> particular recipient. E.g., if a URL looked like this:
    >>
    >> http://www.mysite.com/sales.aspx?admin=false
    >>
    >> it wouldn't take very much working out that changing admin=false to
    >> admin=true might allow people to see parts of the site which they should
    >> not see... OK, that's a bit of an extreme example, but you get the
    >> idea...
    >>
    >> 2) More and more people are configuring their email client not to display
    >> hyperlinks in emails, or even to filter out any email which contains
    >> hyperlinks...
    >>
    >>
    >> --
    >> Mark Rae
    >> ASP.NET MVP
    >> http://www.markrae.net

    >
    > Thanks for your reply,
    > So what do you sugest? I want to inform somebody that he should look at a
    > page. what is the best way?
    Paul Shapiro, Apr 29, 2008
    #4
    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. RedEye
    Replies:
    2
    Views:
    3,275
    RedEye
    Nov 18, 2003
  2. Rob G
    Replies:
    17
    Views:
    2,077
  3. Ersin Gençtürk

    sending inline image in email via .net smtp mail

    Ersin Gençtürk, Feb 28, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    3,984
    bruce barker
    Feb 28, 2005
  4. Luke
    Replies:
    2
    Views:
    4,682
    Nigel Wade
    Mar 15, 2007
  5. James

    Sending Page via Email

    James, Sep 21, 2004, in forum: ASP General
    Replies:
    2
    Views:
    120
    Jeff Cochran
    Sep 21, 2004
Loading...

Share This Page