Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

C# page turning up blank

Posted on 2009-04-05
2
Medium Priority
?
348 Views
Last Modified: 2013-12-17
Hey,

I am trying to use a multi-view control on a page and when I try to run it, it is turning up blank and not displaying anything.

Appreciate the help.
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="MyPictures.aspx.cs" Inherits="MyPictures" %>
 
<!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>
    <asp:MultiView ID="MultiView1" runat="server">
        <asp:View ID="UploadPictures" runat="server">
            <asp:Label ID="Label1" runat="server" Text="Upload Pictures"></asp:Label><br />
            <asp:Panel ID="Panel1" runat="server" Height="16px" Width="272px" style="position: relative; z-index: 100; left: 0px; top: 8px;" BorderColor="Transparent">
                  
                <asp:Label ID="Label2" runat="server" Text="Upload Pictures" EnableTheming="True" Font-Bold="False" Height="19px" Width="104px" BackColor="LightSteelBlue" ForeColor="Snow"></asp:Label>
                  
                <asp:Button ID="btnViewPictures" runat="server" Font-Bold="False" Height="19px" Style="z-index: 102; left: -6px; position: relative; top: 0px" Text="View Pictures" Width="104px" BackColor="Gainsboro" ForeColor="Maroon" OnClick="btnViewPictures_Click" />
              </asp:Panel>
            <br />
            <form id="form1" runat="server">
                <asp:FileUpload ID="upldImage" runat="server" />
                <br />
                <br />
                <asp:Button ID="btnUpload" runat="server" Text="Upload" OnClick="btnUpload_Click" />
                
                <br />
            </form>
            <div style='color:red'>
                <asp:Literal Runat="server" ID="lblMessage" />
            </div>
        </asp:View>
        <asp:View ID="ViewPictures" runat="server">
            <asp:Label ID="Label3" runat="server" Text="My Pictures"></asp:Label><br />
            <asp:Panel ID="Panel2" runat="server" Height="16px" Width="280px" style="left: 0px; position: relative; top: 8px">
                  
                <asp:Button ID="btnUploadPictures" runat="server" Text="Upload Pictures" Height="19px" Width="104px" BackColor="Gainsboro" BorderColor="White" ForeColor="Maroon" OnClick="btnUploadPictures_Click"></asp:Button>
                <asp:Label ID="Label4" runat="server" Text="My Pictures" style="text-align: center; z-index: 100; left: 128px; position: absolute; top: 0px;" Height="19px" Width="104px" BackColor="LightSteelBlue" ForeColor="Snow"></asp:Label>
            </asp:Panel>
            <br />
        </asp:View>
    </asp:MultiView>
</body>
</html>

Open in new window

0
Comment
Question by:tqrecords
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 4

Accepted Solution

by:
y0usuf earned 2000 total points
ID: 24074366
you must explicitly set a particular view active either in page load or in events. in page load do this.
MultiView1.setActivView(ViewName);
0
 

Author Comment

by:tqrecords
ID: 24074413
thanks a lot.
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question