Paste dynamic Server.Transfer

Last post 09-27-2005, 2:02 PM by joey. 4 replies.
Sort Posts: Previous Next
  •  09-26-2005, 9:16 AM 11015

    Paste dynamic Server.Transfer

    I need to be able to prompt a user for a page name (somepage.html) that will then be inserted into the page as asp code.  The inserted code would look something like where somepage.html is provided by the user:
     
    <%
    Server.Transfer("somepage.html")
    %>
     
    I need to do this from a command button.  I have been building my command buttons in VB.NET on the server side and would prefer to do the same with this.  Any ideas?
  •  09-26-2005, 1:57 PM 11034 in reply to 11015

    Re: Paste dynamic Server.Transfer

    joey,
     
    You can just create a custom button.
     
    When the users click this button, you can paste the above html code into the editor.
     
    Hope it helps.
     
    Let me know if you have any further questions.
     
     

    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

  •  09-26-2005, 5:57 PM 11055 in reply to 11034

    Re: Paste dynamic Server.Transfer

    Is there a way to prompt the user for the page name that they will be transferred to?
  •  09-27-2005, 12:02 PM 11091 in reply to 11055

    Re: Paste dynamic Server.Transfer

    You can javascript prompt to gather information from the user.

    Example:


    <script runat="server">
     void Page_Load(object sender, System.EventArgs e)
     {
          CuteEditor.ToolControl tc = Editor1.ToolControls["insertcustombutonhere"];
          if(tc!=null)
          {    
               System.Web.UI.WebControls.Image Image1 = new System.Web.UI.WebControls.Image ();
               Image1.ToolTip    = "Insert today's date";
               Image1.ImageUrl    = "tools.gif";
               Image1.CssClass    = "CuteEditorButton";
               SetMouseEvents(Image1);
               Image1.Attributes["onclick"]="var reply = prompt('Type your name please', ''); CuteEditor_GetEditor(this).ExecCommand('PasteHTML',false,reply)";
               tc.Control.Controls.Add(Image1);
          }
     }
     
     void SetMouseEvents(WebControl control)
     {
          control.Attributes["onmouseover"]="CuteEditor_ButtonCommandOver(this)";
          control.Attributes["onmouseout"]="CuteEditor_ButtonCommandOut(this)";
          control.Attributes["onmousedown"]="CuteEditor_ButtonCommandDown(this)";
          control.Attributes["onmouseup"]="CuteEditor_ButtonCommandUp(this)";
          control.Attributes["ondragstart"]="CuteEditor_CancelEvent()";
     }
    </script>
     

    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

  •  09-27-2005, 2:02 PM 11102 in reply to 11091

    Re: Paste dynamic Server.Transfer

    Works perfectly.  Thanks!
View as RSS news feed in XML