Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Professional
ASP.NET 2.0 Professional If you are an experienced ASP.NET programmer, this is the forum for your 2.0 questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Professional 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
Old August 15th, 2008, 10:33 PM
Authorized User
Join Date: Aug 2007
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default The problem of search speed abot Profile data!

I know I can use the code below to store user's profile data, If I want to search a user who's first name is "First Name", I have to compare them one by one, I think it's vey slow, is there a better way?

And more, I think if I store FirstName field in a individual table, I can use the SQL to serach the user (select username from usertable where firstname='First Name'), it's simple and quick! so I think it's better to use a individual table to store user's profile data, is it right?

    <add name="FirstName" type="System.String"/>
    <add name="LastName" type="System.String"/>

-------------------------------------Search Profile -----------------------------
    protected void Button1_Click(object sender, EventArgs e)
        Profile.FirstName = "First Name";
        Profile.LastName = "Last Name";

    protected void btnSearch_Click(object sender, EventArgs e)
        MembershipUserCollection allUsers = Membership.GetAllUsers();
        foreach (MembershipUser user in allUsers)
            if (Profile.GetProfile(user.UserName).FirstName == "First Name")
                btnSearch.Text = user.UserName;
-------------------------------------Search Profile-----------------------------

http://www.hothelpdesk.com/ - Web Based Helpdesk, Customer Service, Customer Support Software
Online Calculator - Online platform to create program with C# 4.0 and share with other people

Similar Threads
Thread Thread Starter Forum Replies Last Post
Export Membership Profile Data vickyc ASP.NET 2.0 Professional 0 October 11th, 2007 04:12 PM
custom membership retrieve profile problem lesstalk ASP.NET 2.0 Professional 0 February 23rd, 2007 10:03 AM
user profile creation problem yasminnnnn BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 6 December 11th, 2006 09:13 AM
Problem with Search and Update data shopgirl Classic ASP Databases 10 March 9th, 2004 10:26 AM
Problem with the speed of compiling java programs sharadagarwal BOOK: Beginning Java 2 4 February 21st, 2004 02:40 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.