.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Post New Web Links

Prevent duplicate entry into aspnet_profile table through CreateUserWizard?

Posted By:      Posted Date: September 19, 2010    Points: 0   Category :ASP.Net

Is it possible to setup the CreateUserWizard to check for a duplicate entry in the aspnet_profile table (for a custom field) before the new user is created?  For example, if I added a phone number field and wanted to make sure nobody else could create an account using that same phone number if a user already has an account with that phone number in the aspnet_Profile table's PropertyValuesString row? 

View Complete Post

More Related Resource Links

Prevent duplicate entry upon keypress

Hi, I have a form with 4 textboxes. How would I prevent the user from entering a duplicate value upon keypress? Thanks

Implementing a custom Membership Provider vs. using aspnet_Profile table - Which should I do?


I wanted to expand the amount of information that is associated with each user(MembershipUser) in the ASPNETDB.MDF database file. Adding columns like FirstName, LastName, etc. So I began implementing my own custom Membership Provider. I created a derived MembershipUser class with the extra private variables that I wanted each MembershipUser record to store. Its basically done. Almost after I did this I stumbled across the columns in the ASPNETDB.MDF->aspnet_Profile table called "PropertyNames" and "PropertyValuesString".  Could I have simply used these two columns to accomplish what I was attempting to do or are these columns for global application configuration settings?  

Is the aspnet_Profile table purpose to store expanded/related information about users such as personal information? Or is it for something else? Thanks.

SSRS Table hide duplicate by date

Hi, I am parikshit deshpande i am working in SSRS 2005 from last three months. I am trying to solve this problem please help me for that, I have one table as per  Date                     Shift                               Tons                       Passes 1/1/2009            Day                                    Formula                  Formula 1/1/2009           Swings                            1/2/2009           Day 1/2/2009     &nb

Duplicate records find in table

  Hi ALL, I want to find the dynamically check the primary key values and remove the duplicate records.. please suggest it.   Regards Ram

Duplicate rows in Table

Hi, I have a table with two rows Name  ||    Surname || Account No || Money Expensise || Amount                                                     Total ------------ Amount How can I display the last row Total at the bottom of the table not for every first row.  Thanks Anyone helps!

Prevent CalendarExtender from Adopting Table CSS

Ok, my eyes are bleeding and I spent 4 hours last night narrowing down my problem to the stupid table CSS in which the calendarextender/textbox resides in. I'm using a CalendarExtender inside a GridView ItemTemplate along with a textbox.  Both of thse are withii an Ajax UpdatePanel but I don't think that is causing any problem at all. Long story short, the GridView is based on CSS and the rowstyle/altrow style have the following spacing.  With the spacing in place the Ajax CalendarExtender is hosed ...days missing, partial months, etc.  As soon as Ii set the padding to 0 in the grid CSS the calendar displays perfectly. I have already copied/created a ajax__calender.css file with the default calendar css rules but that didn't help.  How do I override the table td tr, etc. rules of the gridview within the ajax calendar CSS so the gridview table crap isn't picked up by the calendar control?  I don't want to have to alter the gridview CSS and make all my gridviews look like crap for the sake of making a calendar display correctly. http://i392.photobucket.com/albums/pp9/tophog01/Misc/gridview.png  Help? .yuigrid .rowstyle td, .altrowstyle td {padding: 4px 10px 4px 10px; border-right: solid 1px #cbcbcb; } If I set the above rule for the gridview to the below everything is fine.  Aggravating! padding: 0px; border-right: sol

InfoPath Repeating Table - Force new row entry

Hi,Wondering if anyone has had a similar situation.. I have an InfoPath form with a repeating table. When the user completes a row and saves the doc, I want this to be non-editable, so any subsequent changes have to be added as new row. Seems simple enough, but maybe it's just been a long day.. :) Any suggestions?Thanks,Laura

I need only the most recent entry from a table.

I have the following tables: Prospect Table ------------------------------------------------------------------------------------------------ | prospect_id | prospect_first | prospect_last | prospect_phone | prospect_email    | ------------------------------------------------------------------------------------------------ |          1       | John              | Doe              | 1234567890      | email@email.com | ------------------------------------------------------------------------------------------------ Corp Table --------------------------- | corp_id | corp_name | --------------------------- |    1       |   My Corp   | ---------------------------- Stores Table ---------------------------------------- | store_id | store_name | corp_id | ---------------------------------------- |    1        | Main Store   |    1      | ---------------------------------------- Unitsize Table ---------------------- | us_id | us_desc | --------------------- |   1     | &

Update duplicate field in same table

  hi I have a table with some other duplicate field as below   IssueID Title A1 Test1 A1 Test2 A2 Test3 A2 Test4 A3 Test5 A4 Test6   i want update all duplicate field based on IssueID and the final result will show as below   IssueID Title A1 Test1 A1 Test1 A2 Test3 A2 Test3 A3 Test5 A4 Test6 may someone help me?  

CreateUserWizard not showing a duplicate user message

I'm using emails as the user name, and I've got requiresUniqueEmail="true" in the web.config.I have an empty CreatingUser method, and in CreatedUser I perform a couple of table entries with the new user.When I try to add a user with an email that's already in use, I get a the default success message.  But no user is added, andit doesn't reach the CreatedUser method.I must be missing something.  Ideas?

Duplicate data table


Hi everyone,

I am having problems with my ASP.Net results.

When I pressed the view report button three times, it displays the table three time horrizontally.

The sql is a stored procedure that populates a pivot table.

How can make it display once every time I hitted the report.



Delete Duplicate Records from MySQL table


I have Revision column in Quote table with time stamp (MySql table) now i am viewing the entire date and time my end user want to view only Date he doesnot want to see time how can i pull only date.i am displaying revision column in two ways one in grid view and another one in field value

Query in my Grid view
Dim query As String = "SELECT QuoteNumber,Revision,Vendor,PartNumber,status,Customer,Requestor from quotes"
On select check box in grid view, filed values will be loaded with data.

field value
txtRev.Text = dt.Rows(indx)("Revision").ToString()




select top row for multiple entry for a date in table


My current query is

select  Date= createdon , Total=count(*) from ReportDetail where 
reportid = 9 and (CreatedOn BETWEEN '07/01/2010' AND '09/30/2010') 
group by  createdon
order by createdon desc

return data like

2010-09-21 09:36:46.493    112
2010-09-21 08:33:12.667    114
2010-09-21 07:45:20.830    176
2010-09-21 07:33:34.340    114
2010-09-20 07:27:43.753    125
2010-09-17 10:04:27.120    75
2010-09-16 11:50:05.777    52

What I am looking for

2010-09-21 09:36:46.493    112
2010-09-17 10:04:27.120    75
2010-09-16 11:50:05.777    52

Basically for 9/21, I want to get only one latest row. Please advice.

Replicating a table to it's duplicate with different physical /index structure

Hello,  We're planning to replicate a very large table (about 1TB) -- Yes Table, not database.  Can afford only very little (10-20 min)  downtime.    Is it possible to have clean replication with the source table in the source database (non partitioned) to destination table in the destination database (partitioned and indexed differently than the source) ?   Although data is the same.     We're primarily doing this replication for paritioning sake , as we can't afford downtime.  So the plan is to replicate the entire source database to the destination.   There are 2-3 large tables that hold 80% of the database data.   So when both DBs are in sync, we'll repoint the production.


Insert value from one table to another in SQL using CreateUserWizard control



I am using CreateUserWizard Control to register clients in my SQL Database. I have two tables: Customers and Categories. Customers CustomerID is a foreign key in Categoris. It is also automatically generated when values are inserted into Customers table.

Categories tables receives values from CheckBoxList control as CatCodes.

Everything works fine but one. When values are inserted into Customers and Categories table during registration, CustomerID is not inserted into the Categories table using the following sql code:

<asp:SqlDataSource ID="InsertDealerId" runat="server" ConnectionString="<%$ ConnectionStrings:myconnection %>"
  InsertCommand="INSERT INTO [Categories] ([CustomerID]) 
 SELECT Customers.CustomerID FROM Customers WHERE Customers.CustomerID = @CustomerID"
  ProviderName="<%$ ConnectionStrings:myconnection.ProviderName %>">
  <asp:Parameter Name="DealerID" />

I have tested is in SQL management studio and it gives no error, which means code is correct. Also, following is my full code with code behind to better understand what is going on. It's been a week now I am struggling with this and can't und

Update Query in aspnet_Profile table


I am using .net membership properties that uses aspnet_Profile tbl to store property name in column PropertyNames and their values in PropertyValuesString with semicolon delimiter so that

UserId PropertyNames PropertyValuesString
9F2B0B68-2E0B-4640-B9A9-8BDBC52385C7 imageORavatar:S:0:1:Title:S:1:2:FirstName:S:3:5:Avatar:S:8:10:AboutMe:S:18:4:LastName:S:22:5:Company:S:27:4:AcceptMailUs:S:31:5:Newsletter:S:36:4:AcceptMailOthers:S:40:5:Address:S:45:3: 2mruser5Winter.jpgewwruser5testFalseTrueFalsenil

No i want to write an Update query that update the propertyAvatar against Userid but dont know how to write it, Any help would be really appreciated.

Problem inserting ID value from one SQL table to another using CreateUserWizard



I am designing a registration form where I use CreateUserWizard. I am inserting data into two different tables while use is created. First table is Categories (columns: CustomerID, CatCode) where I insert CatCodes based on selections made in CheckBoxList and second table is Customers (columns: CustomerID, FName, LName, Email) where I register personal details (first, last name, email etc). CustomerID is generated automatically when client registers.

What I want to do is to connect Categories and Customers tables so when client selects CatCodes during registration and selected values are written into the Categories table CatCode column, appropriate CustomerID to be written there as well (in CustomerID column which is a ForeignKey from Cusomers table).

For example: Client is registered, his CustomerID (1001) is created during registration. He also selected three categories (1,2,3) which are written into the Categories table. Now as I have CustomerID in Categories Table as well (ForeignKey from Customer Table CustomerD column), I want generated CustomerID to show up in Categories table so i could later identify what catgories did client 1001 selected.

Category codes (CatCode) is inserted using code behind file in C#:

 protected void CreateUserWizard1_CreatedUser(obje
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend