Working with strings in aspnet

Discussion in 'ASP.NET / ASP.NET Core' started by steldingc, Feb 2, 2006.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. I need work with strings in classic asp inthe asp.net environment.

    The sample code http://kb.discountasp.net/article.aspx?id=10248works. It pops the email message from the mail box and displays iton the browser with the code:

    Dim count As Integer = pop.MessageCount()
    Dim msg As String = String.Empty
    If count >0 Then
    'get the first message
    msg = "<strong>Message 1</strong>"
    msg += "<pre>" + Server.HtmlEncode(pop.GetMessageAsText(0)) + "</pre>"
    Else
    'if the first message doesn't exist, write out a friendly message
    msg = "No messages at the server"
    End If

    Now I want to put the msg in a classic asp string as strMsg so that I can work with the string like:

    strMsg=replace(strMsg, ">", "")
    response.write strMsg

    How can I put the "msg" (displayedon the browserusing asp.net) into classic asp strMsg?
     
  2. Bruce

    Bruce DiscountASP.NET Staff

  3. I don't think I understand what you are talking about. You want to use the example code on ASP instead of ASP.NET? Please rephrase your question. ASP and ASP.net are seperate and there is no using ASP in an ASP.net environment. You either use ASP or ASP.net.

    You can have both an ASP page and an ASP.net page or a PHP or Perl page on the same website, but they are all not related to eachother and your website isn't forced into a specific technology.

    I'm really unclear about this using ASP in an ASP.net environment you are talking about.

    Can you please post what actions you are trying to perform, source code you are using, error message (if any) and an example URL that we can play with?


    Joel Thoms

    DiscountASP.NET
    http://www.DiscountASP.NET
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page