473,414 Members | 1,703 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,414 software developers and data experts.

fonts enlarge on postback

hi

everytime my .net page reloads after pressing a submit button, the fonts get enlarged. i dunno why this happens and how to check this

can anyone pls help me on this...
Jul 23 '08 #1
9 3388
Frinavale
9,735 Expert Mod 8TB
Are you using a style sheet?
If so, are you dynamically adding the style sheet to the page?
Jul 23 '08 #2
Are you using a style sheet?
If so, are you dynamically adding the style sheet to the page?
thanx for replying

no i'm not using any style sheets. i dont need them yet.

its just a simple screen with labels, textboxes and a button.

the problem remains
Jul 23 '08 #3
Frinavale
9,735 Expert Mod 8TB
thanx for replying

no i'm not using any style sheets. i dont need them yet.

its just a simple screen with labels, textboxes and a button.

the problem remains
Try applying a style to your page to fix the problem.
If you don't know how to use CSS, w3c is a great resource to learn how to use it.

-Frinny
Jul 23 '08 #4
Try applying a style to your page to fix the problem.
If you don't know how to use CSS, w3c is a great resource to learn how to use it.

-Frinny
thanx for the suggestion...but i dont want to use style sheets right now and keep my application as simple as possible. i dont think such a problem should surface when style sheets are not in use. am i doing something wrong or is it possible that something could be wrong with my software?
Jul 24 '08 #5
Frinavale
9,735 Expert Mod 8TB
everytime my .net page reloads after pressing a submit button, the fonts get enlarged.
There could be a number of reasons for this...
It could be your browser settings... it could be that you are displaying text in a Label in one area and in a Localize in another and your browser treats them differently.

To make sure that your page is displayed the same all the time you should use css...it's as simple as: <asp:Label id="myLabel" runat="server" style="font-size:12px"></asp:Label>

....Does your text keep enlarging every time you post back??
Jul 24 '08 #6
There could be a number of reasons for this...
It could be your browser settings... it could be that you are displaying text in a Label in one area and in a Localize in another and your browser treats them differently.

To make sure that your page is displayed the same all the time you should use css...it's as simple as: <asp:Label id="myLabel" runat="server" style="font-size:12px"></asp:Label>

....Does your text keep enlarging every time you post back??

The text size increases with the first postback. Then it remains large even after subsequent postbacks. The size does not increase further.
Jul 25 '08 #7
Frinavale
9,735 Expert Mod 8TB
Please post your ASP code responsible for displaying your text.

-Frinny

(PS. remember to use [code] tags when posting code snippets)
Jul 25 '08 #8
Please post your ASP code responsible for displaying your text.

-Frinny

(PS. remember to use code tags when posting code snippets)

if you are talking about the source code of the page, here it is:

Expand|Select|Wrap|Line Numbers
  1. <%@ Page Language="C#" AutoEventWireup="true"  CodeFile="LoginScreen.aspx.cs" Inherits="_Default" %>
  2.  
  3. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  4.  
  5. <html xmlns="http://www.w3.org/1999/xhtml" >
  6. <head runat="server">
  7.     <title>Login Page</title>
  8. </head>
  9. <body bgcolor="#a6d7ff">
  10.     <form id="form1" runat="server">
  11.     <div>
  12.         &nbsp;&nbsp;
  13.         <asp:Label ID="WelcomeLabel" runat="server" Font-Bold="True" Font-Italic="True" Font-Names="Times New Roman"
  14.             Font-Size="X-Large" Font-Underline="True" ForeColor="Navy" Style="z-index: 100;
  15.             left: 343px; position: absolute; top: 43px" Text="Welcome to Login Screen" Width="444px"></asp:Label>
  16.         <asp:Label ID="UserNameLabel" runat="server" Font-Bold="True" Font-Size="Large" ForeColor="Navy"
  17.             Style="z-index: 101; left: 324px; position: absolute; top: 214px" Text="User Name:" Width="130px"></asp:Label>
  18.         <asp:Label ID="PasswordLabel" runat="server" Font-Bold="True" Font-Size="Large" ForeColor="Navy"
  19.             Style="z-index: 102; left: 336px; position: absolute; top: 274px" Text="Password:" Width="115px"></asp:Label>
  20.         <asp:TextBox ID="UserNameTextbox" runat="server" BackColor="LightCyan" Style="z-index: 103; left: 460px; position: absolute; top: 213px"></asp:TextBox>
  21.         <asp:TextBox ID="PasswordTextbox" runat="server" BackColor="LightCyan" Style="z-index: 104;
  22.             left: 460px; position: absolute; top: 273px" TextMode="Password"></asp:TextBox>
  23.         <asp:RequiredFieldValidator ID="UserNameRequiredFieldValidator" runat="server" ControlToValidate="UserNameTextbox"
  24.             ErrorMessage="Name is Required" ForeColor="DarkRed" Style="z-index: 105; left: 632px;
  25.             position: absolute; top: 215px" Width="118px">*</asp:RequiredFieldValidator>
  26.         <asp:RequiredFieldValidator ID="PasswordRequiredFieldValidator" runat="server" ControlToValidate="PasswordTextbox"
  27.             ErrorMessage="Password is Required" ForeColor="DarkRed" Style="z-index: 106;
  28.             left: 632px; position: absolute; top: 275px" Width="132px">*</asp:RequiredFieldValidator>
  29.         <asp:ValidationSummary ID="ValidationSummary1" runat="server" ForeColor="DarkRed"
  30.             HeaderText="Please take care of the following errors:" Style="z-index: 107; left: 351px;
  31.             position: absolute; top: 400px" Width="241px" />
  32.         <asp:Button ID="LoginButton" runat="server" BackColor="LightSteelBlue" Height="27px"
  33.             Style="z-index: 108; left: 460px; position: absolute; top: 327px" Text="Login"
  34.             Width="50px" OnClick="LoginButton_Click" />
  35.         <asp:Label ID="InvalidUserLabel" runat="server" ForeColor="DarkRed" Style="z-index: 110;
  36.             left: 324px; position: absolute; top: 368px"></asp:Label>
  37.  
  38.     </div>
  39.     </form>
  40. </body>
  41. </html>
Jul 26 '08 #9
Frinavale
9,735 Expert Mod 8TB
Try removing the Font-Names property from the labels and see if that makes a difference....

The only thing that comes to mind is that your validation is causing the change. The validators run some JavaScript that may be messing with your sizing/spacing on the page.

-Frinny
Jul 28 '08 #10

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

Similar topics

3
by: u473 | last post by:
I need to enlarge an Access report from 8 1/2 x 11 to 13 x 19. Is there an easy way to do this rather than repositioning and enlarging each control ? Thank You. Celeste Edwards
1
by: Trace C | last post by:
We are needing to ensure that the fonts in our C# Windows App will enlarge if the user sets their environment settings on their PC to large fonts. I know that to ensure that the fonts size...
4
by: L | last post by:
Hi there, Does C# support OpenType fonts? My c# application is not recognizing OpenType fonts. Thanks, Lalasa.
4
by: Aaron Gray | last post by:
Is there anyway to get a list of all the availiable fonts in Javascript ? Aaron
2
by: Luc | last post by:
I saw a few posts on this newsgroup about it but nothing to help me resolve this problem: We designed a window in .NET on a platform using small fonts (120 ppp). But this window will run on...
1
by: Atul | last post by:
Hi, I have installed a truetype font (.ttf) on a linux machne (SUSE linux 10, KDE) by copying it to my .fonts folder. I can use the font in all applications like open-office and firefox browser....
57
by: Chris Tomlinson | last post by:
Hi all, Hope someone is able to help. I notice when I design a basic HTML page, it is affected if a WinXP user has Large Fonts set in their Control Panel. However some pages, e.g....
12
by: ctclibby | last post by:
Hi all Have a customer that wants a specific font included in her web page design; Comic Sans MS. This is one of the MS core fonts. The problem I have is that some of the *nix browsers do NOT...
4
by: Agnes | last post by:
MY application is designed based on 800 X600 screen size. However, some client use 1024 X768 , When they run the application, the form become smaller. I don't want to re-wrtie all the forms How...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.