473,473 Members | 1,425 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Handling Postbacks if using ISAPI rewrite?

We're using ISAPI rewrite to turn this:

/district/2

into this actual URL

/default.aspx?siteID=2

Up to this point, things have been working perfectly, but we've never had to
do a postback, oddly enough. We're finally adding some functionality and
want to do some post back stuff.

The problems is that a postback keeps trying to reload this page:

/district/2/default.aspx?siteID=2

Which, of course, is non-existant.

I could add yet another rewrite rule to handle the odd postback URL, but is
there a more proper solution? Is there something I need to set up in my app
so postbacks actually load the proper page?

I've done a bit of googling and it sounds like the issue is simply a
Microsoft Bug. ARGH!

-Darrel
Jun 2 '06 #1
1 1799
> I've done a bit of googling and it sounds like the issue is simply a
Microsoft Bug. ARGH!


OK, through a LOT of googling, I found one possible solution. But I'm a bit
stumped on the instructions.

The answer is on this page, about 3/4 the way down:
http://msdn.microsoft.com/library/de...lrewriting.asp

----------------------------------
namespace ActionlessForm {
public class Form : System.Web.UI.HtmlControls.HtmlForm
{
protected override void RenderAttributes(HtmlTextWriter writer)
{
writer.WriteAttribute("name", this.Name);
base.Attributes.Remove("name");

writer.WriteAttribute("method", this.Method);
base.Attributes.Remove("method");

this.Attributes.Render(writer);

base.Attributes.Remove("action");

if (base.ID != null)
writer.WriteAttribute("id", base.ClientID);
}
}
}

----------------------------------
I'm stuck on this:

"Once you have created this class and compiled it, to use it in an ASP.NET
Web application, start by adding it to the Web application's References
folder."

I assume I need to take the above, turn it into a DLL, and then reference it
from my VB application. How does one do that?

I tried making a new C# Class Library project, but VS.net didn't like the
'System.Web.UI.HtmlControls.HtmlForm' part and wouldn't let me compile.

-Darrel
Jun 2 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Jon Maz | last post by:
Hi All, I am experimenting with URL Rewriting using the techniques outlined by Scott Mitchell in his article "URL Rewriting in ASP.NET"...
12
by: Vaca Louca | last post by:
Hello, I write an ISAPI authentication module which uses Berkeley DB and want it to be as efficient as possible. Both ISAPI and BerkeleyDB use arrays of chars (char *) to pass and receive...
14
by: Al Smith | last post by:
I need help in implementing proper error handling. I am trying to upload a file based on the sample code below. The code works well except if the file selected is too big. I do know about the...
10
by: Guoqi Zheng | last post by:
I know I can use http module in my asp.net project to rewrite url. However that is only true for .aspx page, there are many other static page in my application such as .htm. .asp, etc. My...
0
by: Dan | last post by:
I have a huge site written in asp and i have now written a isapi filter of sorts in asp.net to rewrite my dynamic urls to search engine friendly urls and translate them on iis to the true address....
0
by: darrel | last post by:
We're using ISAPI rewrite on our site. We have a URL that looks like this: /district/2/ that gets rewritten to: /default.aspx?siteID=2
12
by: rurpy | last post by:
Is there an effcient way (more so than cgi) of using Python with Microsoft IIS? Something equivalent to Perl-ISAPI?
4
by: dkode | last post by:
Hello, The webhost that I have my asp.net website with does not allow me to change the ISAPI handler for IIS, I am wondering if there is a way to accomplish this without modifying the ISAPI...
4
by: royend | last post by:
Hi. Is is possible to pass parameters with this URL: www.mysite.com/article/sports/football instead of the usual method: www.mysite.com/article.asp?category=sports&subcategory=football And,...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.