p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   BOOK: Beginning ASP.NET 4.5 : in C# and VB (http://p2p.wrox.com/forumdisplay.php?f=710)
-   -   Chapter 4: Using the Wizard to Create Forms (http://p2p.wrox.com/showthread.php?t=93187)

mohamad June 30th, 2014 01:08 PM

Chapter 4: Using the Wizard to Create Forms
 
Received Error Message: The left-hand side of an assignment must be a variable, property or indexer C:\BegASPNETCS\Site\Demos\Containers.aspx.cs

Code:

protected void Wizard1_FinishButtonClick(object sender, WizardNavigationEventArgs e)
    {
        Result.Text = "Your name is " + YourName.Text;
        Result.Text += "<br />Your favorite language is" =
            FavoriteLanguage.SelectedValue;
    }

Same error message when using the source downloaded code from Chapter 4. Thks.

Cheers,
Mohamad

Imar June 30th, 2014 03:07 PM

Hi there,

Take a look at this:

Code:

Result.Text += "<br />Your favorite language is" = FavoriteLanguage.SelectedValue;
See that last equals sign? That should be a plus. You may also want to add an additional space after the word is giving you this code:

Code:

Result.Text += "<br />Your favorite language is " + FavoriteLanguage.SelectedValue;
Quote:

Same error message when using the source downloaded code from Chapter 4
Are you sure you copied over the correct code or ran the correct file? The code that comes with the book is correct and should run without an error.

Cheers,

Imar

mohamad June 30th, 2014 09:14 PM

Thanks Imar,

Typo error on my part. The source downloaded code from Chapter 4 also work fine.

Cheers,
Mohamad


All times are GMT -4. The time now is 12:38 PM.

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