Hi,
Yes.... well, I think so at least...
However, I could only find a method called "Render()" to override (I'm using C# and ASP.Net 2.0). Is this the same thing?
I could not find an OnRender() method... ???
Anyway, I tried this: -
protected override void Render(System.Web.UI.HtmlTextWriter writer)
{
ClientScript.RegisterForEventValidation("BuyLetDropDown", "Select...");
base.Render(writer);
}
...which did not work, so I also tried this:
protected override void Render(System.Web.UI.HtmlTextWriter writer)
{
ClientScript.RegisterForEventValidation(BuyLetDropDown.UniqueID, "Select...");
base.Render(writer);
}
...which also did NOT solve the problem.
So I tried: -
protected override void OnRender(System.Web.UI.HtmlTextWriter writer)
{
ClientScript.RegisterForEventValidation("BuyLetDropDown", "Select...");
ClientScript.RegisterForEventValidation(BuyLetDropDown.UniqueID.ToString(), "Select...");
Register(this);
base.Render(writer);
}
private void Register(Control ctrl)
{
foreach (Control c in ctrl.Controls)
Register(c);
Page.ClientScript.RegisterForEventValidation(ctrl.UniqueID);
}
This also did NOT work.
I tried these methods as I'd seen this done in examples on the internet. However, this is only a problem as described - i.e., only in that scenario and only with Firefox.
I still don't know much about what causes it etc and the solutions I've seen offerred by various websites, books and on the MSDN don't work in my case. It's one of these annoying problems that add silly amounts of time whilst trying to find a solution. It also gets you down as a developer. The workaround I used works but is far from ideal and not a long term solution. Any help or ideas appreciated.
Thanks - Darren