Jminatel - I could write an entire book about the errors in this book and error and omissions in the source code. Sorry if I've been rude, but every time I pick this thing up I get angry. I was most interrested in chapeter 9. A quick glance thru and I saw this on p277
Code:
string strTestControl = Me.ControlToValidate;
This line is half
vb and half c#. There are many more examples of syntax problems in the c# code.
I've deleted the source code from my computer (because it was rubbish) but to answer your quesion I just downloaded again
http://media.wiley.com/product_ancil..._Web_Parts.zip.
First off - the directory structure when you unzip everything is wrong. Opening the projects gives errors because the related projects aren't in the right place.
Now let's try the website in chapter 11. Here he doesn't even try to include c# code. I'M flexible. I'll proceed in
VB. But I get a database connection error. I add these lines to web.config to fix it: (my own knowledge - beginners would be stuck at this point)
Code:
<connectionStrings>
<clear/>
<add name="LocalSqlServer" connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=false" />
</connectionStrings>
There's no reason this shouldn't have been there in the download.
Now I get error:
Quote:
|
quote:Procedure or Function 'aspnet_PersonalizationPerUser_GetPageSettings' expects parameter '@TimeZoneAdjustment', which was not supplied.
|
so I take this out of the stored procedure parameters:
Code:
@TimeZoneAdjustment INT
and add this instead
Code:
DECLARE @TimeZoneAdjustment INT
SET @TimeZoneAdjustment = 0
Now I get error:
Quote:
|
quote:@CurrentTimeUtc is not a parameter for procedure
|
so I add this parameter
Code:
@CurrentTimeUtc DATETIME
. Again - beginners would not be able to solve this problem.
Now it runs and I get a Customize button. Clicking this does nothing. What the F!!! I went thru all that hassle to get this running and now look at the souce files - there are only 2
VB files with 3 empty functions total!
Try chapter 12 by opening Chapter12.sln. It Builds! Fantastic! Let's see what it does. Open the
VB project and there's a source file with a CustomerInformation WebPart control. Now I want to see the C# version. It contains a single source file Address.cs which has 2 empty functions!