ASP.NET - Webpage Space Problem

Asked By Jahir on 17-Apr-12 03:46 AM
in my web appln i have successufully created my project buti have 1 problem the page takes toomuch of space i want to reduce that all spaces ? how ? in rightside it takes so much of spaces how to reduce that ?
Reena Jain replied to Jahir on 17-Apr-12 03:49 AM
Hi,

Big space is depend on code of your site. It might possible that you have not applied the proper architecture to create site
Here are
Tips for Making it Faster

1. Make sure you use Better Speedy server
2. make Use of caching in Website
3. also when you dont need ViewStates Disable it in Contols
4. when u don't want to sort / paging data when u display it Use Repeater Instead of GridView
5. Validate your code with W3C
6. Optimize Images for Web using photoshop or other tool you prefer
dipa ahuja replied to Jahir on 17-Apr-12 03:50 AM
You can handle the page layout with the table tag:

Create a master page with this format :

your master file should look like this:
 
<%@ Master Language="C#" AutoEventWireup="true" CodeFile="MasterPage3.master.cs"
  Inherits="MasterPage3" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
  <title></title>
</head>
<body>
  <form id="form1" runat="server">
  <div>
<table runat="server">
  <tr>
  <td colspan="2">
  logo of your website
  </td>
  </tr>
  <tr>
  <td>
  Menus
  </td>
  <td>
  <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
  </asp:ContentPlaceHolder>
  </td>
  </tr>
  <tr>
  <td colspan="2">
  Bottom menus
  </td>
  </tr>
</table>
  </div>
  </form>
</body>
</html>

 
Now add a content file By Right Click on the Master file -> Add Content Page
Or add new webForm and choose "Select master file" checkbox in the add new item dialogbox
Now your Child page look like this:
<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage3.master" AutoEventWireup="true" CodeFile="Default8.aspx.cs" Inherits="Default8" %>
 
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
add your child page content or controls here
</asp:Content>
 
 
 
 
Hope you get it!
 
 
Somesh Yadav replied to Jahir on 17-Apr-12 03:51 AM
My guess is that this a style related item. The "Developer Toolbar" for FireFox is a great plugin for this type of thing as it allows you to inspect the document and see what is taking up the space.
dipa ahuja replied to Jahir on 17-Apr-12 03:52 AM
Sorry for prev ans.

Are you talking about the storage/memory space? 
Jahir replied to dipa ahuja on 17-Apr-12 03:58 AM
no, i have created web appln its successfully run in I browser but in right handside so much of empty space is showing here...
in bottom it show scrollbar it webpage size is so big... i want to reduce the page how ?
dipa ahuja replied to Jahir on 17-Apr-12 04:03 AM
oh then follow my prev ans which i posted for setting layout with master page