943,469 Members | Top Members by Rank

Ad:
  • ASP.NET Discussion Thread
  • Marked Solved
  • Views: 12621
  • ASP.NET RSS
Aug 2nd, 2003
0

ASP.NET and Mozilla - Issues!

Expand Post »
I have been playing around with Mozzila, and find it too be a rather nice speedy browser, but I do ASP.NET programming and such and seem to have some issues with ASP.NET pages displaying properly.

It seems to be with regards to coloring, I guess ASP controls as well
, since those are the things I have colored.


See example code below!

ASP.NET Syntax (Toggle Plain Text)
  1. <%@ Page Language="C#" %>
  2. <script runat="server">
  3.  
  4. // Insert page code here
  5. //
  6.  
  7. void Submit_Click_1(object sender, EventArgs e) {
  8. if (txtPassword.Text == "test")
  9. {
  10. Session["UserName"] = txtName.Text;
  11. //Response.Redirect("Test.aspx");
  12. Server.Transfer("Test.aspx");
  13. }
  14. else
  15. {
  16. lblFalse.Text = ("Incorrect Pasword Please try again");
  17. }
  18. }
  19.  
  20. </script>
  21. <html>
  22. <head>
  23. </head>
  24. <body>
  25. <p align="center">
  26. <asp:Label id="lblHeader" runat="server" head="head" height="25px" width="100%" backcolor="Black" forecolor="White" font-bold="true" text="ASPWEB Login Page" tooltip="Welcome to ASPWEB Login Page">ASPWEB
  27. Login Page</asp:Label>
  28. </p>
  29. <form runat="server">
  30. <!-- Insert content here -->
  31. <table cellspacing="15" align="center" sytle="font:10pt verdana;border-width:2;border-style:solid;border-color:black;">
  32. <tbody>
  33. <tr>
  34. <td>
  35. <b>UserName:</b>
  36. </td>
  37. <td>
  38. <asp:TextBox id="txtName" runat="server"></asp:TextBox>
  39. </td>
  40. </tr>
  41. <tr>
  42. <td>
  43. <b>Password:</b>
  44. </td>
  45. <td>
  46. <asp:TextBox id="txtPassword" runat="server" TextMode="Password"></asp:TextBox>
  47. </td>
  48. </tr>
  49. <tr colspan="2">
  50. <td>
  51. <asp:Button id="Submit" onclick="Submit_Click_1" runat="server" Text="Submit" Width="77px"></asp:Button>
  52. </td>
  53. </tr>
  54. </tbody>
  55. </table>
  56. </form>
  57. <div align="center"><asp:Label id="lblFalse" runat="server" width="843px" backcolor="White" font-bold="True" font-size="Medium"></asp:Label>
  58. </div>
  59. </body>
  60. </html>

Anyone have a solution? Recommendation?
Similar Threads
Team Colleague
Reputation Points: 211
Solved Threads: 27
Master Poster
Paladine is offline Offline
793 posts
since Feb 2003
Aug 2nd, 2003
0

Re: ASP.NET and Mozilla - Issues!

Well, I found some of the answer, but still not perfect. (see below). Anyone have any other suggestions?

What I did was add code (xml) to my web.config file in the <system.web> section

ASP.NET Syntax (Toggle Plain Text)
  1.  
  2. <browserCaps>
  3. <!--NETSCAPE 6 and 7 //-->
  4. <case match="^Mozilla/5\.0 \([^)]*\) (Gecko/[-\d]+ )?Netscape[6|7]/(?'version'(?'major'\d+)(?'minor'\.\d+)(?'letters'\w*)).*">
  5. tagwriter=System.Web.UI.HtmlTextWriter
  6. browser=Netscape
  7. version=${version}
  8. majorversion=${major}
  9. minorversion=${minor}
  10. frames=true
  11. tables=true
  12. cookies=true
  13. javascript=true
  14. javaapplets=true
  15. ecmascriptversion=1.5
  16. w3cdomversion=1.0
  17. css1=true
  18. css2=true
  19. xml=true
  20. </case>
  21. <!-- MOZILLA //-->
  22. <case match="^Mozilla/(?'version'(?'major'\d+)(?'minor'\.\d+)(?'letters'\w*)).*">
  23. <case match="^[5-9]\." with="${version}">
  24. tagwriter=System.Web.UI.HtmlTextWriter
  25. </case>
  26. </case>
  27. <!--OPERA 5+//-->
  28. <case match="Opera[ /](?'version'(?'major'\d+)(?'minor'\.\d+)(?'letters'\w*))">
  29. <filter match="[4-9]" with="${major}">
  30. <filter match="[5-9]" with="${major}">
  31. tagwriter=System.Web.UI.HtmlTextWriter
  32. </filter>
  33. </filter>
  34. </case>
  35. </browserCaps>
Team Colleague
Reputation Points: 211
Solved Threads: 27
Master Poster
Paladine is offline Offline
793 posts
since Feb 2003
Dec 25th, 2003
0

Re: ASP.NET and Mozilla - Issues!

browserCaps are the way to go. Thats the same browserCaps section I use for #Portal lol.
Moderator
Reputation Points: 322
Solved Threads: 28
The C# Man, Myth, Legend
Tekmaven is offline Offline
914 posts
since Feb 2002
Jul 15th, 2005
0

Re: ASP.NET and Mozilla - Issues!

Great Tip. It worked perfect for the problem I had with listbox sizes, control placement without html tables (not asp:table) and for textbox sizing (i had already figured out column setting for those though).

Nothing else would have worked except for some table nesting structures for control placement of my asp.net web form.

Thanks a lot.

btw...is there anything for safari? I haven't actually tested it yet, but our graphic designers use Safari exclusively and they would also like to use this web application I'm building.

gary_it@yahoo.com
Reputation Points: 10
Solved Threads: 1
Newbie Poster
chiefwun is offline Offline
1 posts
since Jul 2005
Jul 15th, 2005
0

Re: ASP.NET and Mozilla - Issues!

browserCaps will also fix some of the HTML rendering issues. Panels will render as DIVs instead of Tables, etc. I've been meaning to write an article on browerCaps...
Team Colleague
Reputation Points: 227
Solved Threads: 37
Made Her Cry
tgreer is offline Offline
1,697 posts
since Dec 2004
Jul 28th, 2005
0

Re: ASP.NET and Mozilla - Issues!

Mozilla will render widths correctly if it comes from the style attribute or a stylesheet.

Cheers,
Steve
Reputation Points: 10
Solved Threads: 3
Newbie Poster
cambia is offline Offline
17 posts
since Jul 2005

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in ASP.NET Forum Timeline: how to check mail address is exists or not
Next Thread in ASP.NET Forum Timeline: I Need Sample ASP.NET Code





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC