Skip to content

Commit

Permalink
2004-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
Browse files Browse the repository at this point in the history
	* HtmlForm.cs: fixed the Action property when running a different
	page than the one requested (Transfer). Closes bug #69318.


svn path=/branches/mono-1-0/mcs/; revision=36813
  • Loading branch information
gonzalop committed Nov 30, 2004
1 parent 241d79e commit eeb4b2e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
5 changes: 5 additions & 0 deletions mcs/class/System.Web/System.Web.UI.HtmlControls/ChangeLog
@@ -1,3 +1,8 @@
2004-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>

* HtmlForm.cs: fixed the Action property when running a different
page than the one requested (Transfer). Closes bug #69318.

2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>

* HtmlForm.cs: disabled smartnavigation as we have no scripts to support
Expand Down
10 changes: 5 additions & 5 deletions mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlForm.cs
Expand Up @@ -9,6 +9,7 @@
using System.Text;
using System.Web;
using System.Web.UI;
using System.Web.Util;

namespace System.Web.UI.HtmlControls{

Expand Down Expand Up @@ -87,19 +88,18 @@ protected override void RenderChildren (HtmlTextWriter writer)
Page.RegisterViewStateHandler();
}

internal string Action{
internal string Action {
get{
string executionFilePath = Context.Request.CurrentExecutionFilePath;
string filePath = Context.Request.FilePath;
string attr;
if (String.ReferenceEquals(executionFilePath, filePath) == true){
if (executionFilePath == filePath) {
attr = filePath;
int lastSlash = attr.LastIndexOf('/');
if (lastSlash >= 0)
attr = attr.Substring(lastSlash + 1);
}
else{
attr = System.Web.Util.UrlUtils.MakeRelative(filePath,executionFilePath);
} else {
attr = UrlUtils.MakeRelative (executionFilePath, UrlUtils.GetDirectory (filePath));
}
string queryString = Context.Request.QueryStringRaw;
if (queryString != null && queryString.Length > 0)
Expand Down

0 comments on commit eeb4b2e

Please sign in to comment.