Comment posting hangs in IE8

Topics: ASP.NET 2.0, Controls
Sep 16, 2009 at 5:30 AM

comments are not posted when connecting to site using IE8. (didn't test other IEs)

but it works with all other major browsers.

it happens only with the posts that have unicode characters in the title.

what can i do with it?

(I used this guy's techniques for unicode support:

test comment sending on my site:

طراحی وب سپید sepid web development

Sep 16, 2009 at 6:12 PM

The problem seems to be from the "action" attribute of the form element in the html code. IE doesn't understand the unicode in the action. this is the url that comment parameters should be posted to:

POST /Sepid/post/1388/06/23/%D8%B7%D8%B1%D8%A7%D8%AD%DB%8C-%D9%88%D8%A8-%D8%A8%D8%AF%D9%88%D9%86-%D8%A7%D8%B3%D8%AA%D9%81%D8%A7%D8%AF%D9%87-%D8%A7%D8%B2-%D8%AC%D8%AF%D9%88%D9%84.aspx HTTP/1.1

and firefox does it correctly.

but this is the url IE tries to post parameters to:

POST /post/1388/06/23/�����-��-����-�������-��-����.aspx HTTP/1.1

of course he will receive the content of 404 page as response, not the response of correct comment posting.

and it hangs.

the form action value is set automatically,

i can't urlEncode the url serverSide, because the form tag is running at server, and i can't use <% %> notation. and the "action" attribute is being created automatically.

maybe the only solution is to use a script on client side to force encoding of the url before post??

but i'm not familiar with javascript.

please help me ben (or anyone who can help)

i don't seem to be able to go any further with this! :(

right now visitors with IE can't leave a comment on my site!

Sep 16, 2009 at 7:29 PM

I found a quick solution. seems working for some while....

i used this code in commentview.ascx

<!--[if lte IE 8]>
<script type="text/javascript">
var theForm = document.forms['aspnetForm'];
if (!theForm) {
    theForm = document.aspnetForm;

theForm.action =  encodeURI(theForm.action);


I wish it won't cause trouble for the browsers i haven't tested, or for future browsers!