473,326 Members | 2,076 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Why ASP.NEt C# doPostBack function is not appearing in the Html code?

I have a form with multiple dropdownlist and each list has onselectedindexchanged defined.

Expand|Select|Wrap|Line Numbers
  1. <asp:DropDownList ID="SPR" runat="server" OnSelectedIndexChanged="Reload_OnSelectedIndexChanged" AutoPostBack="true">
  2.     <asp:ListItem Text="1 day" Value="1:D"></asp:ListItem>
  3.     <asp:ListItem Text="5 days" Value="5:D"></asp:ListItem>
  4.     <asp:ListItem Text="1 month" Value="1:M"></asp:ListItem>
  5.     <asp:ListItem Text="3 months" Value="3:M"></asp:ListItem>
  6.     <asp:ListItem Text="6 months" Value="6:M"></asp:ListItem>
  7.     <asp:ListItem Text="1 year" Value="1:Y"></asp:ListItem>
  8.     <asp:ListItem Text="2 years" Value="2:Y"></asp:ListItem>
  9. </asp:DropDownList>
  10.  
So when I run the page I expect to receive the postbackcode and the select code with the onchange property defined.

When I invoke the pages in Explorer, Safari or Chrome everything works fine but in Firefox the __doPostBack function and the onchange property in the select tags are not defined. Why is that?
Oct 5 '10 #1
6 2714
Frinavale
9,735 Expert Mod 8TB
I don't know why....it should work.
Do you have other JavaScript on the page that might be interfering with the process?

-Frinny
Oct 6 '10 #2
Yes, but there is something tricky. If I change the user agent in Firefox, the code appears and the page works just fine. Why is that? The IIS identify which navigator I am using and decide to give some functionality or not?
Oct 6 '10 #3
Frinavale
9,735 Expert Mod 8TB
A friend of mine claimed that that occurs... But I've never experienced it myself.
I use FireFox as my main browser when testing (have been for the last 5 years) and I haven't experienced what you're describing.

What version of the .NET framework are you developing with?
Oct 6 '10 #4
Another thing, if i run an instance in my computer (debugging from VS2008) and "visit" the page from firefox the code appears, but when i take the project in "production server" the code doen't appear, there is a configuration of the iis that i have to do?
Oct 6 '10 #5
Frinavale
9,735 Expert Mod 8TB
Nope, ASP.NET should generate the necessary JavaScript responsible for preforming this task. In fact the __doPostback() method is required for most page submittions ... it should work fine.
Oct 6 '10 #6
Yeah, I know that, but I don't know why is not displaying the code just in Firefox. So, I'm still not able to see the code. Telling to the user to change the user agent is not a viable answer.
Oct 6 '10 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Lowell Kirsh | last post by:
Is there a module or library anyone knows of that will print html code indented? What I'd like would be for a function or class which works like this: htmlIndent(sys.stdout,...
4
by: Lukasz Indyk | last post by:
hello;) i have a piece of html code, and want to replace every image on my page with this code. now i do it by replacing IMG node with SPAN node, and then setting innerHTML property of SPAN node...
3
by: JoeK | last post by:
Hey all, I am automating a web page from Visual Foxpro. I can control all the textboxes, radio buttons, and command buttons using syntax such as: ...
16
by: graham.reeds | last post by:
I am updating a website that uses a countdown script embedded on the page. When the page is served the var's are set to how long the countdown has left in minutes and seconds, but the rest of the...
3
by: christopher.davidson | last post by:
Hello, I am working with XML files and utilizing Array functions to take the XML data and combined it with some html code to display a particular page. The process currently works like so: ...
1
by: aaa | last post by:
I want to perform assignment to property Text of Label in HTML code by calling a function writen in C# code behind. What is the syntax?
2
by: Henry Jones | last post by:
In ASP.NET 1.1, I have a Datagrid and I have the following column: <asp:TemplateColumn HeaderText="ID" ItemStyle-HorizontalAlign="Center" ItemStyle-BackColor="0066cc"> <ItemTemplate> <%#...
3
by: Axel Gallus | last post by:
I wrote a javascript function which should return the html code between a frame's body tag: function load_frame_as_string( Framename ) { var Frame =...
1
by: drchaos | last post by:
Placing HTML code with inline javascript into a div both as rendered HTML(the intended final purpose) and shown as RAW text HTML (for the user to copy and paste into their own webpage.) Here is...
10
dj12345
by: dj12345 | last post by:
Hi, (Asp.net + Ajax) I am creating a page which will fetch data from server without postbak of a page.. I have 2 controls on this page TextBox and Lable. I have assigned TextBoxWatermark...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.