Wrox Programmer Forums
|
ASP.NET 1.1 As of 10/6/2005, this forum is locked as part of the reorganization described here: http://p2p.wrox.com/topic.asp?TOPIC_ID=35394. No posts have been deleted. Open ongoing discussions from the last week have been moved to either ASP.NET 1.0 and 1.1 Beginners http://p2p.wrox.com/asp-net-1-0-1-1-basics-60/ or ASP.NET 1.0 and 1.1 Professional. http://p2p.wrox.com/forum.asp?FORUM_ID=50. See my sticky post inside for more.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.1 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 14th, 2004, 10:51 PM
Authorized User
 
Join Date: Jul 2004
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Default urgent help!!!

i try compiling an code in my computer but i get the following error.

what's wrong??

Parser Error Message: The directive 'Control' is unknown.

Source Error:


Line 1: <%@ Control Language="c#" %>
Line 2:
Line 3: <table style="BACKGROUND-COLOR:#cc0033" width="100%" cellpadding="10" cellspacing="0">



 
Old July 14th, 2004, 11:33 PM
Friend of Wrox
 
Join Date: Jun 2004
Posts: 331
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to qazi_nomi
Default

Dear try to use this


<%@ Page Language="C#" ContentType="text/html" %>


cheers (:_:)




Numan
--------------------------------------------------
Love is the most beautiful thing of this world. So do this !
 
Old July 14th, 2004, 11:44 PM
Authorized User
 
Join Date: Jul 2004
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Default

i got even more errors
like the following

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Web.HttpException: Control 'LanguageList' of type 'DropDownList' must be placed inside a form tag with runat=server.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[HttpException (0x80004005): Control 'LanguageList' of type 'DropDownList' must be placed inside a form tag with runat=server.]
   System.Web.UI.Page.VerifyRenderingInServerForm(Con trol control)
   System.Web.UI.WebControls.DropDownList.AddAttribut esToRender(HtmlTextWriter writer)
   System.Web.UI.WebControls.WebControl.RenderBeginTa g(HtmlTextWriter writer)
   System.Web.UI.WebControls.WebControl.Render(HtmlTe xtWriter writer)
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
   System.Web.UI.Control.RenderChildren(HtmlTextWrite r writer)
   System.Web.UI.Control.Render(HtmlTextWriter writer)
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
   System.Web.UI.Page.ProcessRequestMain()




 
Old July 14th, 2004, 11:55 PM
Friend of Wrox
 
Join Date: Jun 2004
Posts: 331
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to qazi_nomi
Default

Could you post the code of that page here ?





Cheers (:_:)




Numan
--------------------------------------------------
Love is the most beautiful thing of this world. So do this !
 
Old July 15th, 2004, 12:18 AM
Authorized User
 
Join Date: Jul 2004
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Default

<%@ Control Language="c#" %>

<table style="background-color:#cc0033" width="100%" cellpadding="10" cellspacing="0">
    <tr>
        <td width="10%"">
            <img src="logo.gif" align="left" />
        </td>
        <td width="60%">
            <asp:label id="WelcomeMessage" runat="Server">Welcome to the Wrox shop!</asp:label>
        </td>
        <td width="30%">
             Select your Language:<br />
            <asp:DropDownList id="LanguageList" runat="Server" OnSelectedIndexChanged="DropList_Changed" AutoPostBack="True"/>

        </td>
    </tr>
</table>

<script runat="server">

  Hashtable Languages = new Hashtable();

  public void Page_Load()
  {
    Languages.Add("English", "Hello, and welcome to the shop");
    Languages.Add("French", "Bonjour, et bienvenue au magasin");
    Languages.Add("Spanish", "Buenas Dias, e bienvenido a la tienda");
    Languages.Add("German", "Guten Tag, und wilkommen ins geschaeft");

    if (!Page.IsPostBack)
    {
      LanguageList.DataSource = Languages.Keys;
      Page.DataBind();
    }
  }

  public void DropList_Changed(object sender, EventArgs e)
  {
    WelcomeMessage.Text = (String) Languages[LanguageList.SelectedItem.Text];
  }

</script>

 
Old July 15th, 2004, 12:57 AM
Friend of Wrox
 
Join Date: Jun 2004
Posts: 331
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to qazi_nomi
Default

Dear use this it is now working






<%@ page Language= "c#" ContentType="text/html" ResponseEncoding="iso-8859-1" %>

<table style="background-color:#cc0033" width="100%" cellpadding="10" cellspacing="0">
    <tr>
        <td width="10%"">
            <img src="logo.gif" align="left" />
        </td>
        <td width="60%">
            <asp:label id="WelcomeMessage" runat="Server">Welcome to the Wrox shop!</asp:label>
        </td>

    <td width="30%">
      Select your Language:<br>
      <form runat = "server">
     <asp:DropDownList id="LanguageList" name = "Control" runat="Server" OnSelectedIndexChanged="DropList_Changed" AutoPostBack="True"/>
      </form>
      <br />
       </td>
    </tr>
</table>
<script runat="server">

  Hashtable Languages = new Hashtable();

  public void Page_Load()
  {
    Languages.Add("English", "Hello, and welcome to the shop");
    Languages.Add("French", "Bonjour, et bienvenue au magasin");
    Languages.Add("Spanish", "Buenas Dias, e bienvenido a la tienda");
    Languages.Add("German", "Guten Tag, und wilkommen ins geschaeft");

    if (!Page.IsPostBack)
    {
      LanguageList.DataSource = Languages.Keys;
      Page.DataBind();
    }
  }

  public void DropList_Changed(object sender, EventArgs e)
  {
    WelcomeMessage.Text = (String) Languages[LanguageList.SelectedItem.Text];
  }

</script>



Numan
--------------------------------------------------
Love is the most beautiful thing of this world. So do this !
 
Old July 15th, 2004, 01:24 AM
Authorized User
 
Join Date: Jul 2004
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Default

ok.....thanks alot!!!

 
Old July 15th, 2004, 01:30 AM
Friend of Wrox
 
Join Date: Jun 2004
Posts: 331
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to qazi_nomi
Default

Dear if it is working for you then let me infome plz





cheers (:_:)



Numan
--------------------------------------------------
Love is the most beautiful thing of this world. So do this !
 
Old July 15th, 2004, 07:44 PM
Authorized User
 
Join Date: Jul 2004
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,

It is working but i cannot seems to let the wrox logo appear.

 
Old July 16th, 2004, 01:17 AM
Friend of Wrox
 
Join Date: Jun 2004
Posts: 331
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to qazi_nomi
Default

You should check your directry where this file is placed that there must be logo is placed othere wise give it ful path
<img src="ful path of logo.gif" align="left" />



Numan
--------------------------------------------------
Love is the most precious thing of this world. So find and grab it!





Similar Threads
Thread Thread Starter Forum Replies Last Post
urgent deb_kareng ASP.NET 2.0 Professional 1 August 13th, 2007 07:29 AM
it's urgent deb_kareng ASP.NET 2.0 Professional 3 August 7th, 2007 07:40 AM
urgent help yash_coolbuddy_forindia BOOK: Wrox's ASP.NET 2.0 Visual Web Developer 2005 Express Edition Starter ISBN: 978-0-7645-8807-5 1 May 7th, 2007 08:40 AM
urgent???????????? nsr35 Beginning VB 6 1 October 3rd, 2005 10:57 AM
urgent ??????????????? nsr35 Pro VB Databases 0 October 3rd, 2005 04:53 AM





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