Results 1 to 4 of 4

Thread: How to execute Server.Execute function in ASP.NET (C#)

  1. #1
    Join Date
    Oct 2008
    Posts
    93

    How to execute Server.Execute function in ASP.NET (C#)

    I have problems when trying to execute (load) another page like the News Page when a user clicked a News button. When using VB and ASP 3.0, I did the clever dynamic include method of using "Server.Execute", but switching to ASP.NET and C#. Server.Transfer method will transfer the page to the destination page. That means User will able to see the Destination Page if any page defined in Server.Transfer Method.

  2. #2
    Join Date
    Apr 2008
    Posts
    142

    Re: How to execute Server.Execute function in ASP.NET (C#)

    It didn't work but I tried the Redirect mothod from the Page.Response. But Server.Transfer(): It ends up the execution of current form and begins execution with new web form And Server.Execute():it begins execution with new web form but it still holds current web form .With the help of this we can combine the result of two web forms. Instead of using an asp.net hidden control on your user control, just use a regular html hidden input with the code tags <% %> to fill the data like this:
    Code:
    <input id="Hidden1"  type="hidden" value="<%= text %>"/>

  3. #3
    Join Date
    Jan 2006
    Posts
    6,878

    Re: How to execute Server.Execute function in ASP.NET (C#)

    DotNetKicks uses it in the Global.asax file, to handle error pages, you might want to check it out. I receive compiler errors because the reference to "this" in Form2.aspx does not reference the same Page instance as created within the inherited code from Form1.aspx. About what happens when the user refreshes the page, nothing weird, the url in the address bar is requested again and the logic of the page begins from scratch, reissueing eventual Transfers or Executes.

  4. #4
    Join Date
    Mar 2008
    Posts
    349

    Re: How to execute Server.Execute function in ASP.NET (C#)

    I have yet to have a valid use for Server.Execute(), Unlike the Server Side Includes (SSI) #exec command in IIS, which is used to run an executable file, or the SSI #include command, which is also used in ASP, the Server.Execute method is used with ASP pages to execute another ASP page. I receive compiler errors because the reference to "this" in Form2.aspx does not reference the same Page instance as created within the inherited code from Form1.aspx. It seem to me that leaving the original URL in the browser via a Server. Consequently, the "template" page is simply Form2.aspx which is a basic HTML page that is loaded by Form1.aspx and populates elements with the data loaded by the original Page class.

Similar Threads

  1. Taprats 0.8 not able to execute well
    By Laramie in forum Windows Software
    Replies: 6
    Last Post: 28-03-2010, 12:15 AM
  2. Saw game is not able to execute well
    By Sharanya in forum Video Games
    Replies: 5
    Last Post: 25-03-2010, 01:47 AM
  3. PHP: Execute cacls.exe
    By Lambard in forum Software Development
    Replies: 2
    Last Post: 30-05-2009, 09:33 PM
  4. Execute vbscript
    By Juan GarcĂ­a in forum Windows Server Help
    Replies: 4
    Last Post: 15-05-2008, 12:14 AM
  5. How To Execute Iso File?
    By Lupin in forum Windows Software
    Replies: 3
    Last Post: 27-04-2008, 08:41 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,711,662,583.78110 seconds with 17 queries