Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

2 Neutral

About K_Drive

  • Rank

Profile Information

  • Location
    NE Ohio, USA
  1. I am trying to complete what seems like a very simple example project on MSDN to learn how to use Profile Properties that are set up in the web.config file for an ASP.Net/C# project. Here is the link to the MSDN page:MSDN Profile Properties walkthrough I followed the C# steps on this page for the first simple project up to "To test the PostalCode property". I am getting the error below when I run/debug. I am using Visual Studio. I also have SQL Server. I copied/pasted the code. I am getting a server error listed at the end of this post. If I am reading the MS web page correctly, the first simple example uses the anonymousIdentification element. So, no login is necessary I set up this simple project in a new page within an existing project that has a database. I can see the Profile table in SQL Server. But, the app just can't seem to get to it. Is there something else I need to get profiles to work involving the database? -- error listing: -- System.Web.HttpException was unhandled by user codeMessage="Unable to connect to SQL Server database."Source="System.Web" ErrorCode=-2147467259 StackTrace: at System.Web.DataAccess.SqlConnectionHelper.CreateMdfFile(String fullFileName, String dataDir, String connectionString) at System.Web.DataAccess.SqlConnectionHelper.EnsureSqlExpressDBFile(String connectionString) at System.Web.DataAccess.SqlConnectionHelper.GetConnection(String connectionString, Boolean revertImpersonation) at System.Web.Profile.SqlProfileProvider.GetPropertyValuesFromDatabase(String userName, SettingsPropertyValueCollection svc) at System.Web.Profile.SqlProfileProvider.GetPropertyValues(SettingsContext sc, SettingsPropertyCollection properties) at System.Configuration.SettingsBase.GetPropertiesFromProvider(SettingsProvider provider) at System.Configuration.SettingsBase.GetPropertyValueByName(String propertyName) at System.Configuration.SettingsBase.get_Item(String propertyName) at System.Web.Profile.ProfileBase.GetInternal(String propertyName) at System.Web.Profile.ProfileBase.get_Item(String propertyName) at System.Web.Profile.ProfileBase.GetPropertyValue(String propertyName) at ProfileCommon.get_PostalCode() in c:\Users\amredstart\AppData\Local\Temp\Temporary ASP.NET Files\website1\839131dc\b553a82a\App_Code.ocx-hpma.0.cs:line 21 at _Default.Page_Load(Object sender, EventArgs e) in c:\Users\amredstart\Documents\Visual Studio 2005\Projects\WebSite1\CustomerProfiles.aspx.cs:line 16 at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) at System.Web.UI.Control.OnLoad(EventArgs e) at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
  2. Thank you for the replies and for the MSDN reference. I will read more. K
  3. I am going through a book on C# and ASP.Net.I ran across a statement that I don't quite understand.The book does not explain it.From the context I am assuming that it is an "if" statement. Here it is: shippingRegion = (profile.ShippingRegion == null || profile.ShippingRegion == "" ? "1" : profile.ShippingRegion); Here is the code around it: ProfileCommon profile = HttpContext.Current.Profile as ProfileCommon; address1 = profile.Address1; address2 = profile.Address2; city = profile.City; region = profile.Region; postalCode = profile.PostalCode; country = profile.Country;> shippingRegion = (profile.ShippingRegion == null || profile.ShippingRegion == "" ? "1" : profile.ShippingRegion); dayPhone = profile.DayPhone; evePhone = profile.EvePhone; mobPhone = profile.MobPhone; email = Membership.GetUser(profile.UserName).Email; If I need to add more explanation or code, please let me know. Thanks. K
  4. Yes! PasteBin! Thank you, boen robot! niche: I will look more closely at jsfiddle. It looked interesting. K.
  5. I seem to remember a website out there that allowed you to post a block of programming code. After you saved it you were given a link to give to others so they could get to your posted code. You didn't have to have an account or login, which meant the only way to find your post(s) were to keep the link(s). Does this sound familiar to anyone? K
  6. K_Drive

    Book suggestion

    Thanks, jonmunm.I will look into these.(This is a CSS question, I thought.): )
  7. K_Drive

    Book suggestion

    I was wondering if anyone had a good web design book to replace the O'Reilly book: "Web Design in a Nutshell" which was published in 2006.I really like this book and I think I learned a lot from it when I was trying to learn CSS and page design. But, parts of it are out-of-date. I don't like to recommend to to people who want to learn CSS now. Any suggestions?I think the "Sams Teach Yourself HTML and CSS in 24 Hours" isn't too bad. But, the O'Reilly book covered a lot more topics.
  8. I am running SQL Server 2005 on my laptop from a recent ASP.Net project. The web app that I worked on used the FullText search feature.I am now using the same SQL Server 2005 (and VS 2005) to go through an ASP.Net E-Commerce textbook.I am trying to create a FullText Catalog for a new database for the book's exercises.I get this error message when I try to run this command: Create FullText Catalog BalloonShopFullTextError message:Msg 7689, Level 16, State 1, Line 1Execution of a full-text operation failed. 'No such interface supported' I can see the SQL Server FullText Search running in my Task Manager's Services window. And, I have the checkbox checked in this project's database's Propterties window/Files tab.(I ran the " sp_fulltext_database 'enable' " command successfully, too.)What am I missing? I know that the FullText option was used in the previous project I worked on with this copy of SQL Server. Why isn't it working for this new database? What can I do to get it working for this new database?I think my only option is to backup my database files and uninstall/reinstall SQL Server.
  9. I am working through Scott Mitchell's ASP.Net in 24 hours book.I am completing the last project, which is a photo album app.I have a GridView that retrieves a list of uploaded photo image rows specific to the logged in user. The GridView is for editing and deleting rows.The photo Category ID field in the Gridview is a dropdown list. It is also user-specific. These categories were created by users in another web page.When a user uploads a photo image, he/she can select a "none" option for the Category.The ItemTemplate and EditItemTemplate in the dropdown both have the "none" choice added to them in this GridView.I am getting this error:'pictureReadOnlyCategories' has a SelectedValue which is invalid because it does not exist in the list of items.Parameter name: value(The ID in the ItemTemplate for the dropdown list is the one listed above in the error: "pictureReadOnlyCategories".)I went through the book's instructions a couple of times and I am following them. Is there some step in this process that I am missing?Here is the link a screenshot of my code and the Design View that I posted in Flickr:http://www.flickr.com/photos/41863933@N07/4913581226/Thanks
  10. What is strange is that this works in FireFox.(OK - I have been working with CSS for a couple of years now and have worked on pages that need to work for both IE and FF, so I guess I cannot use the word "strange". Things like this happen all the time! LOL)I found a couple of websites that use a different approach. Instead of using the onscroll event they use CSS positioning. I haven't examined their code in detail yet, but that looks like a better solution right now.Thanks for your reply, JustSomeGuy.==============================Yes - Using CSS positioning really worked well. I used fixed positioning. No use for the onscroll anymore.
  11. I am trying to get a menu to move with a page when a user scrolls. The menu isn't the problem.I put an onscroll event in the web page's body tag, but IE 8 does not seem to recognize it.This is from my code: <body onscroll="moveButtonsGroup()" > The function never gets called. I put a simple alert message in it as follows: function moveButtonsGroup( ){alert("I got here.")} I never get the alert message. This works fine in the latest version of FireFox. Does anyone have any information about this?
  12. Thank you, dsonesuk.I will give this a try.I am sorry. I should have been clearer on my original post. I wanted the tables down the page vertically. They are not next to each other side by side. And, I have no problem aligning things inside the tables. But, thanks for that, too.Does anyone know about "clear" being outdated?K
  13. I have tried this (from the Mozilla CSS pages): <div style= "text-align: -moz-right; text-align: right;"> This works in Firefox, but not IE.and this: <div style= "text-align: right; text-align: -moz-right;"> This works in IE, but not FireFox.
  14. I am trying to use three div elements on a page to align three tables.There are tables within each div - that is all. The first should align to the left.The second should be centered.The third to the right.I can use "text-align" in the div elements, and it works great in IE8.But, Firefox does not seem to recognize this and aligns everything to the left.I was going to try using floats and "clear", but I keep reading that "clear" is outdated. I am using Visual Studio and it tells me that "clear" is outdated.So, can someone please tell me how to align these div elements/tables on the page?It doesn't seem like it should be a tricky problem.Here is the basic HTML:<div style="text-align: left;"> <table> ... </table></div><div style="text-align: center;"> <table> ... </table></div><div style="text-align: right;"> <table> ... </table></div>The only other formatting I have on the page is this in the <head>:<style type="text/css">body{margin: 30px;}</style>
  15. I am helping develop a website app. We are running into one small problem with a URL validation for a text field.Here is the validation expression being used:http(s)?://([\w-]+\.)+[\w-]+(/[\w- ./?%&=]*)?It seems to be working fine so far except for one small issue. It cannot handle URLs that have a tilde (~) in them. For example:http://www.taiwanfun.com/central/taichung/...r~Bookstore.htmThe validation says that this is not a valid entry.Does anyone have any suggestions?
  • Create New...