locked
Problem with URL Parameter generation in C# WebPart RRS feed

  • Question

  • I have developed a WebPart in C# which generates email alerts containing a link by which the recipient can retrieve the same record.

    The embedded link should be of the form http://mywebsite/mypage.aspx?id=nn where nn is the record number

    Sometimes (about 50%) the link in the email appears as http://mywebsite/mypage.aspx?id=nn?id=nn i.e the parameter part is repeated.

    This of course is then an invalid link which does not work.

    The fault seems unlikely to be a programming error as I have changed the code which generates the link several times and the result is still the same. I have used parameter substitution using string.format() and simple concatenation to build the string.

    Is anyone aware of any outside factors which may be causing this behaviour?

    Debugging is extremely difficult in this environment, Does anyone know how I can track down this fault?

    Cheers

    Mike

     


    Mike Stephenson
    • Moved by edhickey Tuesday, November 30, 2010 4:15 PM (From:.NET 3.0/3.5 Windows Workflow Foundation)
    Tuesday, November 30, 2010 2:25 PM

Answers

  • Hi,

    This Forum is for Windows Workflow issues, so I will need to move this to a more appropriate Forum so you can get an answer.  Can you give me a bit more detail about the environment and the issue?  Is this a Web or Mobile app?  Can you give us a code sample of the part that is failing?  ANy more detail is appreciated and will help us to solve your issue.

    Ed


    Ed Hickey http://blogs.msdn.com/b/edhickey/archive/2010/04/21/how-to-post-effectively-in-forums.aspx
    • Marked as answer by Mike at Kettle Tuesday, November 30, 2010 4:30 PM
    Tuesday, November 30, 2010 4:14 PM

All replies

  • Hi,

    This Forum is for Windows Workflow issues, so I will need to move this to a more appropriate Forum so you can get an answer.  Can you give me a bit more detail about the environment and the issue?  Is this a Web or Mobile app?  Can you give us a code sample of the part that is failing?  ANy more detail is appreciated and will help us to solve your issue.

    Ed


    Ed Hickey http://blogs.msdn.com/b/edhickey/archive/2010/04/21/how-to-post-effectively-in-forums.aspx
    • Marked as answer by Mike at Kettle Tuesday, November 30, 2010 4:30 PM
    Tuesday, November 30, 2010 4:14 PM
  • Hi Ed,

    I'm a bit new to using forums so posted where I thought most appropriate.

    The application is a workflow application with embedded email alerts and it is using .Net 3.0 so seemed appropriate.

    Anyway as often happens in these cases just asking the question leads you to the answer. ie I have fixed the problem.

    It was code in so much as I was getting a different return from http.Context than I expected.

    I will mark your response as the Answer

     


    Mike Stephenson
    Tuesday, November 30, 2010 4:30 PM
  • No problem Mike, it happens a lot - glad you were able to find an answer.
    Ed Hickey http://blogs.msdn.com/b/edhickey/archive/2010/04/21/how-to-post-effectively-in-forums.aspx
    Tuesday, November 30, 2010 7:20 PM