 |
BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6
 | This is the forum to discuss the Wrox book ASP.NET 2.0 Instant Results by Imar Spaanjaars, Paul Wilton, Shawn Livermore; ISBN: 9780471749516 |
|
Welcome to the p2p.wrox.com Forums.
You are currently viewing the BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 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
|
|
|
|
|

November 28th, 2009, 01:50 AM
|
|
Authorized User
|
|
Join Date: Oct 2009
Posts: 55
Thanks: 26
Thanked 0 Times in 0 Posts
|
|
Stored Procedures in CMS App
Hi,
Was curious to know what the 50 odd Stored Procedures aspnet_..... are used for?
Thanks
Fed
|
|

November 28th, 2009, 05:36 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Hi Fed,
The procedures (and tables and views) are part of the ASP.NET Application Services such as Membership and Roles. They are sometimes created by ASP.NET automatically when you're using the default membership settings and database, or they can be created by the aspnet_regsql tool. For more info about setting up these services, take a look here: http://msdn.microsoft.com/en-us/library/2fx93s7w.aspx
For a general introduction to services such as Membership, take a look here:
http://msdn.microsoft.com/en-us/library/91f66yxt.aspx
Cheers,
Imar
|
|
The Following User Says Thank You to Imar For This Useful Post:
|
Fed (November 30th, 2009)
|
|

November 30th, 2009, 01:47 PM
|
|
Authorized User
|
|
Join Date: Oct 2009
Posts: 55
Thanks: 26
Thanked 0 Times in 0 Posts
|
|
http://schemas.microsoft.com/.NetConfiguration/v2.0
Hi Imar,
You write good books man, so far you're the best. In the config file you have the line "http://schemas.microsoft.com/.NetConfiguration/v2.0,". When I create a new project and I go to modify the config file, the intellisense brings up a list of options as soon as I type "http... none of which even remotely resemble the one you used in the 2.0 book. So basically do I need that line or will the 2008 version assume the correct address? To clarify further in order to learn thsi stuff I am rewriting(read copying) your 2.0 app in VWD 2008, which brings me to the next question, in 2008 the config file has two lines, <appSettings/> & <connectionStrings/>. (I find it odd that the slashes are in the back.) Are these opening tags or closing tags, or what, because they have no partner so to speak. Whereas in your 2.0 version they appear as <appSettings> ... </appSettings> and <connectionStrings> ... </connectionStrings> so what's the deal?
If you're ever in Philly holler at me I'll buy you a beer...
Peace,
Fed
Last edited by Fed; November 30th, 2009 at 03:54 PM..
|
|

November 30th, 2009, 03:42 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Yes, you can easily upgrade the site to .NET 3.5 using VS 2008 (you find an option on the Properties Pages for the site). Your config file will be updated automatically. I think you could remove the .NET 2 reference without a problem. In fact, if I am not mistaken, it even caused IntelliSense to stop in config files in VS 2005.
IIS 3 or 4 is ancient, so I doubt you're using that. 5, 6 or 7 is more likely....
Imar
|
|
The Following User Says Thank You to Imar For This Useful Post:
|
Fed (November 30th, 2009)
|
|

November 30th, 2009, 06:08 PM
|
|
Authorized User
|
|
Join Date: Oct 2009
Posts: 55
Thanks: 26
Thanked 0 Times in 0 Posts
|
|
Hi Imar,
I updated the last question and didn't notice you had already answered so I'm going to repeat it please bear with me.
In 2008 the config file has two lines, <appSettings/> & <connectionStrings/>. (I find it odd that the slashes are in the back.) Are these opening tags or closing tags, or what, because they have no partner so to speak. Whereas in your 2.0 version they appear as <appSettings> ... </appSettings> and <connectionStrings> ... </connectionStrings> so what's the deal?
Thanks
|
|

December 1st, 2009, 04:53 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
These are called self-closing tags and are used for empty elements. They are identical to empty elements. E.g. this:
<appSettings />
is equivalant to this:
<appSettings></appSettings>
Since this element is not required, you might as well delete it altogether.
If they contain data, (e.g. specific app settings) you need an opening and closing tag.
Cheers,
Imar
|
|
The Following User Says Thank You to Imar For This Useful Post:
|
|
|

December 1st, 2009, 06:32 PM
|
|
Authorized User
|
|
Join Date: Oct 2009
Posts: 55
Thanks: 26
Thanked 0 Times in 0 Posts
|
|
LOL! That must qualify for dumb question of the year :) Better one coming up.
I was having a hard time with the Main Menu (Big Tabs) appearing in design view and figured out I had some typos in the CSS, Main Menu now shows up in Design View. Problem which I haven't resolved yet is that the Main Menu is not appearing when I do Ctrl F5, I get tabs that are half the size and of a darker blue and only the first tab has text in it and when I went to select to copy and paste it for you I discovered that the rest of the teb headings are invisible until I selected them accidentally and since my copy screen does not work I will reproduce as I can here;
News
Articles
FAQs
Admin
Login and this is the line with the actual tabs, then beneath I have the login which I got to work by filling in the data in the aspnet_ tables.
So I guess my attempt to figure out the inner workings by typing the application in VWD 2008 is not going as expected. But I am learning some stuff so its not a total loss.
Any ideas why the main menu tabs appear ok in design view and are totally screwed in Ctrl F5?
Do I need to create these aspnet_ tables if and when I design an app on my own? Or are they just a carry over form ASP.NET 2.0 and I don't have to worry about them in 3.5?
In a nutshell what I'm trying to do is migrate your cms app from 2.0 to 3.5 manually so I can understand the inner workings. I looked at the property pages and noticed that the only reference to upgrading to 3.5 is in the Target Framework which I presume and for a lack of a better word means it "builds" the app to 3.5 specs but the actual code iotself remains at 2.0 including the aspnet_ table requirements.
So any suggestions as to where I can get more info on migrating?
Thanks Imar,
Fed
|
|

December 1st, 2009, 10:58 PM
|
|
Authorized User
|
|
Join Date: Oct 2009
Posts: 55
Thanks: 26
Thanked 0 Times in 0 Posts
|
|
Figured out the Main Menu (Big Tabs), must remember to clear out IE's cache ;)
Also figured out that the aspnet_... tables and stored procedures are necessary for Login ;)
Am currently stuck on this though; When I click 'manage categories" in the Admin portion the below happens and what is 'System.Data.DataRowView' ?
Thanks man,
Fed
DataBinding: 'System.Data.DataRowView' does not contain a property with the name 'ContentTypeDescription'.
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: DataBinding: 'System.Data.DataRowView' does not contain a property with the name 'ContentTypeDescription'.
Source Error:
Line 25: <asp:TemplateField HeaderText="Content Type">
Line 26: <ItemTemplate>
Line 27: <asp:Label ID="Label1" runat="server" Text='<%# Bind("ContentTypeDescription") %>'></asp:Label>
Line 28: </ItemTemplate>
Line 29: <EditItemTemplate>
Source File: C:\Documents and Settings\fxs\My Documents\Visual Studio 2008\WebSites\News1\Management\Categories.aspx Line: 27
Stack Trace:
[HttpException (0x80004005): DataBinding: 'System.Data.DataRowView' does not contain a property with the name 'ContentTypeDescription'.]
System.Web.UI.DataBinder.GetPropertyValue(Object container, String propName) +8661429
System.Web.UI.DataBinder.Eval(Object container, String[] expressionParts) +92
System.Web.UI.DataBinder.Eval(Object container, String expression) +106
System.Web.UI.TemplateControl.Eval(String expression) +40
ASP.management_categories_aspx.__DataBinding__cont rol13(Object sender, EventArgs e) in C:\Documents and Settings\fxs\My Documents\Visual Studio 2008\WebSites\News1\Management\Categories.aspx:27
System.Web.UI.Control.OnDataBinding(EventArgs e) +99
System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +92
System.Web.UI.Control.DataBind() +15
System.Web.UI.Control.DataBindChildren() +211
System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +102
System.Web.UI.Control.DataBind() +15
System.Web.UI.Control.DataBindChildren() +211
System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +102
System.Web.UI.Control.DataBind() +15
System.Web.UI.WebControls.GridView.CreateRow(Int32 rowIndex, Int32 dataSourceIndex, DataControlRowType rowType, DataControlRowState rowState, Boolean dataBind, Object dataItem, DataControlField[] fields, TableRowCollection rows, PagedDataSource pagedDataSource) +155
System.Web.UI.WebControls.GridView.CreateChildCont rols(IEnumerable dataSource, Boolean dataBinding) +2417
System.Web.UI.WebControls.CompositeDataBoundContro l.PerformDataBinding(IEnumerable data) +57
System.Web.UI.WebControls.GridView.PerformDataBind ing(IEnumerable data) +14
System.Web.UI.WebControls.DataBoundControl.OnDataS ourceViewSelectCallback(IEnumerable data) +114
System.Web.UI.DataSourceView.Select(DataSourceSele ctArguments arguments, DataSourceViewSelectCallback callback) +31
System.Web.UI.WebControls.DataBoundControl.Perform Select() +142
System.Web.UI.WebControls.BaseDataBoundControl.Dat aBind() +73
System.Web.UI.WebControls.GridView.DataBind() +4
System.Web.UI.WebControls.BaseDataBoundControl.Ens ureDataBound() +82
System.Web.UI.WebControls.CompositeDataBoundContro l.CreateChildControls() +72
System.Web.UI.Control.EnsureChildControls() +87
System.Web.UI.Control.PreRenderRecursiveInternal() +44
System.Web.UI.Control.PreRenderRecursiveInternal() +171
System.Web.UI.Control.PreRenderRecursiveInternal() +171
System.Web.UI.Control.PreRenderRecursiveInternal() +171
System.Web.UI.Control.PreRenderRecursiveInternal() +171
System.Web.UI.Control.PreRenderRecursiveInternal() +171
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +842
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.3603; ASP.NET Version:2.0.50727.4028
|
|

December 2nd, 2009, 12:51 AM
|
|
Authorized User
|
|
Join Date: Oct 2009
Posts: 55
Thanks: 26
Thanked 0 Times in 0 Posts
|
|
Hey figured this one out too, it was a typo in one of the stored procedures. My learning knows no bounds...:)
Peace
|
|

December 2nd, 2009, 05:52 PM
|
|
Authorized User
|
|
Join Date: Oct 2009
Posts: 55
Thanks: 26
Thanked 0 Times in 0 Posts
|
|
Opening links in new window
Hi Imar,
I was wondering if you could tell me how I can open links I paste into the cms content in a new window? Right now it just opens in the existing window.
Also how do I get pictures in there? I tried with the picture button in the FCK editor but it doesn't do it.
PS
How do I start a new thread?
Thanks,
Fed
|
|
 |