I'm fairly new to ASP.NET, although I have a fair amount of C# experience.
I'm creating a SharePoint Web Part, but I'm doing the development for it locally in ASP.NET 1.1
I'm using a DropDownList control with autopostback = true in order to run code on the SelectedIndexChanged event. Both IE 7 and FireFox are obviously loading a page again when a selection is made, but only FireFox actually shows the changes made to the page.
I tried a simple sample page and noticed the same behaviour, here it is
aspx page
<%@ Page language="c#" Codebehind="FakeFormToCodeSteal.aspx.cs" AutoEventWireup="false" Inherits="WebPartTester.FakeFormToCodeSteal" debug="True"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<title>FakeFormToCodeSteal</title>
<meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" Content="C#">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
</HEAD>
<body MS_POSITIONING="GridLayout">
<form id="Form1" method="post" runat="server">
<asp:DropDownList id="DropDownList1" style="Z-INDEX: 101; LEFT: 344px; POSITION: absolute; TOP: 176px"
runat="server" Width="120px" Height="24px" AutoPostBack="True">
<asp:ListItem Value="The First one">The First one</asp:ListItem>
<asp:ListItem Value="The second">The second</asp:ListItem>
<asp:ListItem Value="One more">One more</asp:ListItem>
</asp:DropDownList>
<asp:TextBox id="TextBox1" style="Z-INDEX: 102; LEFT: 88px; POSITION: absolute; TOP: 88px" runat="server"
Width="232px"></asp:TextBox>
<asp:Label id="lbl" style="Z-INDEX: 103; LEFT: 40px; POSITION: absolute; TOP: 168px" runat="server"
Width="272px" Height="160px">Stuff here</asp:Label>
</form>
</body>
</HTML>
aspx.cs page
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
namespace WebPartTester
{
/// <summary>
/// Summary description for FakeFormToCodeSteal.
/// </summary>
public class FakeFormToCodeSteal : System.Web.UI.Page
{
protected System.Web.UI.WebControls.TextBox TextBox1;
protected System.Web.UI.WebControls.Label lbl;
protected System.Web.UI.WebControls.DropDownList DropDownList1;
private void Page_Load(object sender, System.EventArgs e)
{
// Put user code to initialize the page here
}
#region Web Form Designer generated code
override protected void OnInit(EventArgs e)
{
//
// CODEGEN: This call is required by the ASP.NET Web Form Designer.
//
InitializeComponent();
base.OnInit(e);
}
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.DropDownList1.SelectedIndexChanged += new System.EventHandler(this.DropDownList1_SelectedInd exChanged);
this.Load += new System.EventHandler(this.Page_Load);
}
#endregion
private void DropDownList1_SelectedIndexChanged(object sender, System.EventArgs e)
{
lbl.Text = DropDownList1.SelectedItem.Text + " Made it here";
}
}
}
Any help would be much appreciated
3 5510
It could be just something as dumb as a caching issue. I can't think of another way the backend code would cause different reactions from firefox/IE. Web design code yes, backend code no.
Try setting the page to not be cached and see if it helps?
Just a note as I'm passing through. Your doctype is invalid and puts IE into quirks mode. Although new pages should always use a strict doctype, if you must use transitional, use this one:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
Thanks for the replies. I'll try that doc type, I'll admit, I just let VS 2003 put in its default.
I think it might have been a caching issue as well. I ended up adding localhost to the safe sites list and that did it, it now works... not sure why though.
Thanks again for the help.
-mwalts
Sign in to post your reply or Sign up for a free account.
Similar topics
by: sonic_soul |
last post by:
Hi,
I was curious if I could make my webservice work with firefox client
webservice functionality. (i got it to work with webservice.htc)
I am able to get firefox to see my serverside web...
|
by: Jason |
last post by:
I have two drop down lists on my asp.net page, the second of which needs to
be filled in based on the selection in the first dropdownlist. The catch
however, is that it must occur without a...
|
by: Olivier Verdin |
last post by:
Hi,
I have a page with several Textboxes and several DropDownList. When I click
on a 'save' button, it creates a record in a database.
The page works fine under Internet Explorer.
It does...
|
by: Shapper |
last post by:
Hello,
I have na Asp:DropDownList 2 things are not working in Firefox:
CSS and Width.
It works fine in Internet Explorer.
How to solve this?
Thanks,
|
by: TJS |
last post by:
I am finding that the serverside requiredvalidator doesn't fire in the
firefox browser, and user request proceeds through to my updateProfile
method. Validation is working correctly in the IE...
|
by: Klaas |
last post by:
Hi,
Is it possible to get the text in a dropdown list to be bold or italic?
Some entries I want to have bold others normal and others italic.
I cant figure out how to do this.
tia
|
by: harold.gimenez |
last post by:
Hi group,
I am trying to change the selection of an ASP Dropdownlist just like
"Orange" is selected here:
http://www.w3schools.com/js/tryit.asp?filename=try_dom_option_selected
The...
|
by: geetha v |
last post by:
Hi All,
I need a scrolling DIV is a to display my dynamic tree in left frame.
In my jsp , Div overflow is set to "auto"
<DIV id=divScroller style="overflow:auto;height:200px">
<!--...
|
by: SAL |
last post by:
Hello, I did google this issue and found some stuff related to BrowserCaps
section of either web.config or machine.config but it didn't work.
It seems that most pages in my webapp are okay but a...
|
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...
|
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...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
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...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
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....
|
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
|
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...
| | |