Why response.write?

Last post 07-05-2006, 10:52 PM by Adam. 6 replies.
Sort Posts: Previous Next
  •  01-28-2004, 8:23 AM 261

    Why response.write?

    I want to include the editor in my functions.. I always give back the values to the function itself.. Now i cant position the editor on the right place. because:

    Public Function TEST()

     

    strContent = strContent & _

    "<table>" & _

    "<tr>" & _

    "<td>" & Editor.Draw() & "</td>" & _

    "</tr>" & _

    "</table>"

     

    TEST = strContent

    End Function

     

    Can this be possible???

  •  01-28-2004, 6:50 PM 262 in reply to 261

    Re: Why response.write?

    Can you explain to me more details of what you are trying to do?

     

    I got a little confused.


    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  01-29-2004, 2:14 AM 263 in reply to 262

    Re: Why response.write?

    Well im building up a string with design stuff like tables etc. While im building that string I want to include the editor. But since the editor is all response.write I cant do this. I mean i cant build up a string including the cuteeditor and then write the string to the screen since the cuteeditor already write itself down... Pfew im explaining it a bit stupid i quess..

     

    But lets say your building up a string:

     

    string = "hello world"

     

    and i want the editor to be placed between hello and world it aint possible in this setup... i CANT do something like this:

     

    string = "hello " & editor.Draw() & " world"

     

    because of the response.writes it gets written before i write the string to the screen. I hope you understand now.

  •  01-30-2004, 5:38 PM 273 in reply to 263

    Re: Why response.write?

    Still confused here.

     

    and i want the editor to be placed between hello and world it aint possible in this setup... i CANT do something like this:

     

    string = "hello " & editor.Draw() & " world"

     

     

    You can do that. But you need to create the editor object first.

     

    Dim editor

    Set editor = New CuteEditor

    editor.ID = "Editor1"

    editor.Text = "Your text here"

    'editor.FilesPath = "CuteEditor_Files"

    'editor.ImageGalleryPath = "/Uploads"

    'editor.MaxImageSize = 50

    'editor.AutoConfigure = "Simple"

    'editor.Template= "Bold,Italic,Underline"

    'editor.StyleSheetPath = "/grey2.css"

    'editor.Width = 740

    'editor.Height = 240

     

    'Is that what you are trying to do??

    Response.Write editor.Draw() & "Hello World"

     

  •  02-02-2004, 3:29 AM 285 in reply to 273

    Re: Why response.write?

    No thats not what i meant...

     

    Look your example works just fine.. because your parsing it directly to the client... What i want is first store it and parse it at a later time.. because i use a template engine.

     

     

    Your thing works:


    Response.Write editor.Draw() & "Hello World"


     

    But what i want is like:


    strOutput = strOutput & _

    "<table>" & _

    "<tr>" & _

    "<td>" & _

    editor.Draw() & _

    "</td>" & _

    "</tr>" & _

    "</table>"


     

    So now its stored in strOutput.. Later in my scripts i can adjust that variable like:


    strOutput = _

    "Here some more text to the original string" & strOutput


     

    And then at the end of the script writing it out


    response.write strOutput


     

    This all aint possible because the function Draw() is all response write.. So when i call it it already writes the editor to the client... So i cant store it and write it later... Hope you understand now... with this example... just test it out and you know what i mean.

  •  03-09-2006, 4:05 PM 16908 in reply to 261

    Re: Why response.write?

    Simple answer no you cannot. Why, because the ASP code is preprocessed prior to execution. You are trying to create an on the fly ASP code to be executed after the preprocessing. Now if this was LISP...now there is a language for those not weak of heart....
     
    RC
  •  07-05-2006, 10:52 PM 20772 in reply to 16908

    Re: Why response.write?

    Guys,
     
    In the latest build of version 5.2, the new Editor.GetString Method has been introduced.
    This function returns what the Draw function used to write to the response buffer as a string.

    Example Code

          <%
               Dim editor, content
               Set editor = New CuteEditor
               editor.ID = "Editor1"
               editor.Text = "Hello World"

               'returns what the Draw function used to write to the response buffer as a string.
               content = editor.GetString()
               Response.Write content
          %>
     

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

View as RSS news feed in XML