<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://weblogs.asp.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Guru Sarkar's Blog - All Comments</title><link>http://weblogs.asp.net/gurusarkar/default.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>re: Storing User Profile into a Custom Table using CreateUser Wizard control</title><link>http://weblogs.asp.net/gurusarkar/archive/2009/01/27/storing-user-profile-into-a-custom-table-using-createuser-wizard-control.aspx#10257027</link><pubDate>Tue, 07 May 2013 16:34:06 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:10257027</guid><dc:creator>guru_sarkar</dc:creator><description>&lt;p&gt;@hozdaman,&lt;/p&gt;
&lt;p&gt;CreatedUser event is fired only after user is created. And the code is retrieving the ProviderUserKey. So not sure if you are using some different event or something else would be an issue.&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=10257027" width="1" height="1"&gt;</description></item><item><title>re: Storing User Profile into a Custom Table using CreateUser Wizard control</title><link>http://weblogs.asp.net/gurusarkar/archive/2009/01/27/storing-user-profile-into-a-custom-table-using-createuser-wizard-control.aspx#10207251</link><pubDate>Wed, 24 Apr 2013 15:09:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:10207251</guid><dc:creator>hozdaman</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;This is a great tutorial! &amp;nbsp;Thanks.&lt;/p&gt;
&lt;p&gt;How can I add a check to see if if the aspnet_Users table values have been inserted, before the fields for my other table get inserted.&lt;/p&gt;
&lt;p&gt;Im finding that foreign key is trying to insert before the aspnet_Users table is updated. Causing a foreign key constraint.&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=10207251" width="1" height="1"&gt;</description></item><item><title>re: Storing User Profile into a Custom Table using CreateUser Wizard control</title><link>http://weblogs.asp.net/gurusarkar/archive/2009/01/27/storing-user-profile-into-a-custom-table-using-createuser-wizard-control.aspx#10196744</link><pubDate>Mon, 22 Apr 2013 14:24:07 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:10196744</guid><dc:creator>hozdaman</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;This tutorial is great, thanks so much. &lt;/p&gt;
&lt;p&gt;I keep getting the following error. I am wondering do does there need to be a command to let cuw to complete the insert in aspnet_users table before the insert to my User table? &amp;nbsp;Any help would be great. &amp;nbsp;Thanks.&lt;/p&gt;
&lt;p&gt;System.Data.SqlClient.SqlException: The INSERT statement conflicted with the FOREIGN KEY constraint &amp;quot;FK_User_aspnet_Users&amp;quot;. The conflict occurred in database &amp;quot;xxx&amp;quot;, table &amp;quot;dbo.aspnet_Users&amp;quot;, column &amp;#39;UserId&amp;#39;.&lt;/p&gt;
&lt;p&gt;here is my code&lt;/p&gt;
&lt;p&gt; //get the userid of the newly created user&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;MembershipUser newUser = Membership.GetUser(CreateUserWizard1.UserName);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Guid newUserId = (Guid)newUser.ProviderUserKey;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//Get Profile data entered by user&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;String FirstName = ((TextBox)CreateUserWizard1.CreateUserStep.ContentTemplateContainer.FindControl(&amp;quot;UserFirstNameTextBox&amp;quot;)).Text;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;String LastName = ((TextBox)CreateUserWizard1.CreateUserStep.ContentTemplateContainer.FindControl(&amp;quot;UserLastNameTextBox&amp;quot;)).Text;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;String AddressLine1 = ((TextBox)CreateUserWizard1.CreateUserStep.ContentTemplateContainer.FindControl(&amp;quot;AddressLine1TextBox&amp;quot;)).Text;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;String AddressLine2 = ((TextBox)CreateUserWizard1.CreateUserStep.ContentTemplateContainer.FindControl(&amp;quot;AddressLine2TextBox&amp;quot;)).Text;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;String City = ((TextBox)CreateUserWizard1.CreateUserStep.ContentTemplateContainer.FindControl(&amp;quot;CityTextBox&amp;quot;)).Text;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;String State = ((TextBox)CreateUserWizard1.CreateUserStep.ContentTemplateContainer.FindControl(&amp;quot;StateTextBox&amp;quot;)).Text;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;String ZipCode = ((TextBox)CreateUserWizard1.CreateUserStep.ContentTemplateContainer.FindControl(&amp;quot;ZipCodeTextBox&amp;quot;)).Text;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;String PhoneNumber = ((TextBox)CreateUserWizard1.CreateUserStep.ContentTemplateContainer.FindControl(&amp;quot;PhoneTextBox&amp;quot;)).Text;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//open database connection&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;string ConnectionString = ConfigurationManager.ConnectionStrings[&amp;quot;PersonalManagementConnection&amp;quot;].ConnectionString;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;string InsertSql = &amp;quot;INSERT INTO [User](UserId, UserFirstName, UserLastName, UserAddressLine1, UserAddressLine2, UserCity, UserState, UserZipCode, UserPhone1) VALUES(@UserId, @UserFirstNameTextBox,@UserLastNameTextBox,@AddressLine1TextBox, @AddressLine2TextBox, @CityTextBox, @StateTextBox, @ZipCodeTextBox, @PhoneNumberTextBox)&amp;quot;;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;using (SqlConnection MyConnection = new SqlConnection(ConnectionString))&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;MyConnection.Open();&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;SqlCommand MyCommand = new SqlCommand(InsertSql, MyConnection);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;MyCommand.Parameters.AddWithValue(&amp;quot;@UserId&amp;quot;, newUserId);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;MyCommand.Parameters.AddWithValue(&amp;quot;@UserFirstNameTextBox&amp;quot;, FirstName);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;MyCommand.Parameters.AddWithValue(&amp;quot;@UserLastNameTextBox&amp;quot;, LastName);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;MyCommand.Parameters.AddWithValue(&amp;quot;@AddressLine1TextBox&amp;quot;, AddressLine1);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;MyCommand.Parameters.AddWithValue(&amp;quot;@AddressLine2TextBox&amp;quot;, AddressLine2);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;MyCommand.Parameters.AddWithValue(&amp;quot;@CityTextBox&amp;quot;, City);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;MyCommand.Parameters.AddWithValue(&amp;quot;@StateTextBox&amp;quot;, State);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;MyCommand.Parameters.AddWithValue(&amp;quot;@ZipCodeTextBox&amp;quot;, ZipCode);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;MyCommand.Parameters.AddWithValue(&amp;quot;@PhoneNumberTextBox&amp;quot;, PhoneNumber);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;MyCommand.ExecuteNonQuery();&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;MyConnection.Close();&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;The statement has been terminated.&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=10196744" width="1" height="1"&gt;</description></item><item><title>re: Pass querystring parameter with NavigaterUrl in HyperLink inside a GridView</title><link>http://weblogs.asp.net/gurusarkar/archive/2010/09/23/pass-querystring-parameter-with-navigaterurl-in-hyperlink-inside-a-gridview.aspx#10121312</link><pubDate>Tue, 09 Apr 2013 12:36:11 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:10121312</guid><dc:creator>khizerjalal</dc:creator><description>&lt;p&gt;Thanks, Really Helpful =)&lt;/p&gt;
&lt;p&gt;/KhiZer &lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=10121312" width="1" height="1"&gt;</description></item><item><title>re: Problem with Unordered List ( ul / li ) tags with fixed–width</title><link>http://weblogs.asp.net/gurusarkar/archive/2011/05/11/problem-with-unordered-list-ul-li-tags-with-fixed-width.aspx#10119558</link><pubDate>Tue, 09 Apr 2013 04:24:20 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:10119558</guid><dc:creator>PRABU MCA.,</dc:creator><description>&lt;p&gt;i had problem with ul..but ur solution very helpful to me .. Thanks brother&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=10119558" width="1" height="1"&gt;</description></item><item><title>re: Setting authorization rules for a particular page or folder in web.config</title><link>http://weblogs.asp.net/gurusarkar/archive/2008/09/29/setting-authorization-rules-for-a-particular-page-or-folder-in-web-config.aspx#9921640</link><pubDate>Wed, 27 Feb 2013 17:53:03 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:9921640</guid><dc:creator>guru_sarkar</dc:creator><description>&lt;p&gt;naji,&lt;/p&gt;
&lt;p&gt;yes...There's one example above.&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=9921640" width="1" height="1"&gt;</description></item><item><title>re: Setting authorization rules for a particular page or folder in web.config</title><link>http://weblogs.asp.net/gurusarkar/archive/2008/09/29/setting-authorization-rules-for-a-particular-page-or-folder-in-web-config.aspx#9882840</link><pubDate>Sun, 17 Feb 2013 13:36:55 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:9882840</guid><dc:creator>naji</dc:creator><description>&lt;p&gt;thanks.&lt;/p&gt;
&lt;p&gt;Is it possible to define 1 user in web.config and allow him to a specific folder like admin?&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=9882840" width="1" height="1"&gt;</description></item><item><title>re: Setting authorization rules for a particular page or folder in web.config</title><link>http://weblogs.asp.net/gurusarkar/archive/2008/09/29/setting-authorization-rules-for-a-particular-page-or-folder-in-web-config.aspx#9825531</link><pubDate>Fri, 01 Feb 2013 17:51:32 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:9825531</guid><dc:creator>Dinesh Gupta</dc:creator><description>&lt;p&gt;Great888!!!!!! &amp;nbsp;:)&lt;/p&gt;
&lt;p&gt;I was confused since last 2 years..........now feeling good :)&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=9825531" width="1" height="1"&gt;</description></item><item><title>re: Storing User Profile into a Custom Table using CreateUser Wizard control</title><link>http://weblogs.asp.net/gurusarkar/archive/2009/01/27/storing-user-profile-into-a-custom-table-using-createuser-wizard-control.aspx#9813905</link><pubDate>Tue, 29 Jan 2013 19:02:50 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:9813905</guid><dc:creator>Joe F</dc:creator><description>&lt;p&gt;This is a great tutorial, thanks. &amp;nbsp;One tip, add:&lt;/p&gt;
&lt;p&gt;ON DELETE CASCADE&lt;/p&gt;
&lt;p&gt;...at the end of your CONSTRAINT in your User_Profile table. &amp;nbsp;This will allow user deletes from the primary table to cascade to this table also.&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=9813905" width="1" height="1"&gt;</description></item><item><title>re: jQuery UI Datepicker Visible upon first time page load</title><link>http://weblogs.asp.net/gurusarkar/archive/2011/08/10/jquery-ui-datepicker-visible-upon-first-time-page-load.aspx#9754386</link><pubDate>Tue, 15 Jan 2013 10:00:59 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:9754386</guid><dc:creator>Osh</dc:creator><description>&lt;p&gt;Thank you very much kind sir! Very simple solution indeed! :)&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=9754386" width="1" height="1"&gt;</description></item></channel></rss>