AllExperts > Experts 
Search      

VB.NET

Volunteer
Answers to thousands of questions
 Home · More Questions · Answer Library  · Encyclopedia ·
More VB.NET Answers
Question Library

Ask a question about VB.NET
Volunteer
Experts of the Month
Expert Login

Awards

About Us
Tell friends
Link to Us
Disclaimer

 
 
 
 
About Syed Rizwan Muhammad Rizvi
Expertise
I can answers questions regarding web based and desktop based programming in VB.Net. Which can include SOAP, XML, Custom Controls, COM Interoperability etc.

Experience
Have been working in this specific area for last 2 years previously I was a VB 6 Developer with experties in other languages as well. Total 10 years of programming experience.

 
   

You are here:  Experts > Computing/Technology > Basic > VB.NET > regarding master pages

Topic: VB.NET



Expert: Syed Rizwan Muhammad Rizvi
Date: 4/23/2008
Subject: regarding master pages

Question
QUESTION: can we use master pages while developing dynamic applications or it can only be used in static applications?

because i am using master pages in dynamic applications. how to change the size of the content place holder dynamically so that any pages which are called from the tree control should be displayed within the contentplaceholder perfectly, i mean to say that i am using tree control by web.sitemap file, in master pages we have at the left side all the links to the site and as soon as we click the links the content of the link displayed in content place holder, i have increase the size of content place holder by <div>. in this way :-
<div style="height: 1000px; width:600px; overflow: scroll;">
                   <asp:contentplaceholder id="ContentPlaceHolder1" runat="server">
                    </asp:contentplaceholder>
                    </div>
I have the footer as well in masterpage. i am using gridview in content pages whose content are filled dynamically. my problem is that content of the gridview displayed on the footer. how can i change the size of the content place holder so that according to the size of the content pages footer will move up and down and all the content pages will be displayed within the content place holder ? it should not beyond the footer.

ANSWER: try:

                  <asp:contentplaceholder id="ContentPlaceHolder1"
runat="server">
<div style="height: 1000px; width:600px; overflow: scroll;">
                   </div>
                   </asp:contentplaceholder>

Also if you can tell me which country/city you are located in right now. We are hiring people in firm.

Regards,
Riz

---------- FOLLOW-UP ----------

QUESTION: Thanks for the answer . I also tried this way but it is not working .

ANSWER: you need to send me source.

---------- FOLLOW-UP ----------

QUESTION: here is the souce code of the masterpage.master

<%@ Master Language="VB" CodeFile="MasterPage.master.vb" Inherits="MasterPage" %>

<!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>Untitled Page</title>
</head>
<body>
   <form id="form1" runat="server">
   <div>
                       <asp:Image ID="Image1" runat="server" ImageUrl="default_01.JPG" ImageAlign="Top" />
       
           <table style="padding-right: 0px; padding-left: 0px; padding-bottom: 0px; margin: 0px;
       padding-top: 0px">
               <tr>
                   <td colspan="3">
                       </td>
               </tr>
               <tr>
                   <td style="width: 10px; background-image: url(default_03.JPG); height: 186px;" colspan="2" align="left" valign="top">
                       <asp:TreeView ID="TreeView1" runat="server" DataSourceID="SiteMapDataSource1" Width="60px" style="padding-right: 0px; padding-left: 0px; padding-bottom: 0px; margin: 0px;
       padding-top: 0px" Height="10px" NodeIndent="10">
                       </asp:TreeView>
                       <asp:SiteMapDataSource ID="SiteMapDataSource1" runat="server" />
                        
                   </td>
                   <td style="width: 100px; height: 186px;">
                   
                   <asp:contentplaceholder id="ContentPlaceHolder1" runat="server">
                   <div style="height: 1000px; width:600px; overflow:scroll">
                    </div>
                    </asp:contentplaceholder>
                   
                   </td>
               </tr>
               <tr>
                   <td colspan="3">
                       <asp:Image ID="Image2" runat="server" ImageUrl="default04.JPG" /></td>
               </tr>
           </table>
      
   </div>
   </form>
</body>
</html>


Answer
I see that you have placed the content panel inside a td, and that you are restricting the height of TD as well. You will have to free content panel's soul out of the TD for it display properly or remove height restrictions from the TD altogether.

Moreover, using tables is now considered bad design.

Regards,
Riz

Add to this Answer    Ask a Question



  Rate this Answer
   Was this answer helpful?
Not at allDefinitely              
   12345  

     
About Us | Advertise on This Site | User Agreement | Privacy Policy | Help
Copyright  © 2008 About, Inc. About and About.com are registered trademarks of About, Inc. The About logo is a trademark of About, Inc. All rights reserved.