Wrox Programmer Forums
|
BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0
This is the forum to discuss the Wrox book ASP.NET 2.0 Website Programming: Problem - Design - Solution by Marco Bellinaso; ISBN: 9780764584640
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 23rd, 2007, 12:21 PM
Friend of Wrox
 
Join Date: Aug 2006
Posts: 131
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to kherrerab Send a message via Yahoo to kherrerab
Default created a label in welcomebox.ascx control but...

Hi all.

I created a label in the control welcomebox so that i can change the content at running time on the web site.

I access the content from an admin page created in /admin in wich i change the content with a fckeditor box. I store the value on a field on the database in a table that i created for this purpose.

The problem is that on some IE < version 7 the labels does not show.

I pupule the label via code.

On firefox and some versions of IE works great.

What could be wrong?

 
Old July 26th, 2007, 12:38 PM
Friend of Wrox
 
Join Date: Aug 2006
Posts: 131
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to kherrerab Send a message via Yahoo to kherrerab
Default

Hello!!!

 
Old July 26th, 2007, 03:17 PM
Friend of Wrox
 
Join Date: Aug 2006
Posts: 142
Thanks: 0
Thanked 2 Times in 2 Posts
Send a message via MSN to vantoko
Default

can you post the html code that is generated (copy from generated source)

koen

 
Old July 26th, 2007, 06:18 PM
Friend of Wrox
 
Join Date: Aug 2006
Posts: 131
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to kherrerab Send a message via Yahoo to kherrerab
Default

the welcomebox.ascx

<%@ Control Language="C#" AutoEventWireup="true" CodeFile="WelcomeBox.ascx.cs" Inherits="MB.TheBeerHouse.UI.Controls.WelcomeBox" %>
<div style="border: dashed 2px red; padding: 4px; background-color: #E3EAEB; color: Maroon; margin-bottom: 10px; font-weight: bold; text-align: left;">
   <asp:Localize runat="server" ID="locWelcome" meta:resourcekey="locWelcomeResource1">
   <b>Administrator Account</b><br />Username: Admin &nbsp;&nbsp;&nbsp; Password: admin
   </asp:Localize>
    <br />
    <br />
</div>
<br />

<asp:Label ID="lblmensaje" runat="server" Style="position: relative"></asp:Label>

C# code

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using MB.TheBeerHouse.UI;

namespace MB.TheBeerHouse.UI.Controls
{
   public partial class WelcomeBox : BaseWebPart
   {
      public WelcomeBox()
      {
         this.Title = "Welcome Box";
      }

      protected void Page_Load(object sender, EventArgs e)
      {
          System.Data.SqlClient.SqlConnection thisConnection = new System.Data.SqlClient.SqlConnection(@Configuration Manager.ConnectionStrings[0].ConnectionString);
          thisConnection.Open();
          System.Data.SqlClient.SqlCommand thisCommand = thisConnection.CreateCommand();
          thisCommand.CommandText = "select mensaje from welcomebox";
          System.Data.SqlClient.SqlDataReader thisReader = thisCommand.ExecuteReader();
          thisReader.Read();
          lblmensaje.Text = thisReader[0].ToString();
          thisReader.Close();
      }
   }
}




 
Old July 27th, 2007, 01:16 AM
Friend of Wrox
 
Join Date: Aug 2006
Posts: 142
Thanks: 0
Thanked 2 Times in 2 Posts
Send a message via MSN to vantoko
Default

Hi,

can you post that is generated in the browser ? (right click/view source)
Since that is the code that isn't showing fine. If your control works in some browsers, it must be the rendered code that does't run

koen

 
Old August 3rd, 2007, 02:02 PM
Friend of Wrox
 
Join Date: Aug 2006
Posts: 131
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to kherrerab Send a message via Yahoo to kherrerab
Default

found the solution

deleted Style="position: relative" from
<asp:Label ID="lblmensaje" runat="server" Style="position: relative"></asp:Label>







Similar Threads
Thread Thread Starter Forum Replies Last Post
ascx control Title SKhna ASP.NET 2.0 Basics 1 March 18th, 2008 12:24 PM
Problem with RssReader.ascx user control retroviz BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 2 October 24th, 2007 07:06 PM
A question about Label Control of VS.net2003 roki_chen General .NET 0 July 5th, 2006 10:17 PM
A question about Label Control of vs.net2003 roki_chen VS.NET 2002/2003 0 July 5th, 2006 10:12 PM
Include vs. User control(ascx) ajindal General .NET 4 January 8th, 2005 09:40 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.