Click here to Skip to main content
15,887,979 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: grid view in edit item template gridview Pin
Rocky#1-Nov-07 21:19
Rocky#1-Nov-07 21:19 
GeneralRe: grid view in edit item template gridview Pin
Malcolm Smart1-Nov-07 22:49
Malcolm Smart1-Nov-07 22:49 
GeneralRe: grid view in edit item template gridview [modified] Pin
Malcolm Smart1-Nov-07 22:51
Malcolm Smart1-Nov-07 22:51 
GeneralRe: grid view in edit item template gridview Pin
Rocky#1-Nov-07 23:37
Rocky#1-Nov-07 23:37 
GeneralRe: grid view in edit item template gridview Pin
Pete O'Hanlon1-Nov-07 23:40
mvePete O'Hanlon1-Nov-07 23:40 
GeneralRe: grid view in edit item template gridview Pin
Rocky#2-Nov-07 2:01
Rocky#2-Nov-07 2:01 
Questionhow its possible Pin
jagadeeshkumar19841-Nov-07 18:28
jagadeeshkumar19841-Nov-07 18:28 
QuestionLooping through data returned from database. Pin
csinva1-Nov-07 18:00
csinva1-Nov-07 18:00 
I'm trying to figure out how to set data coming back from a database to variables to be used to be displayed on different parts of an web page, not in a gridview or anything like that.

For instance I want the sEmail to contain the value from the Email column in the database and so on.

The other big issues is how to loop through a column and pick out the value out of another column. For instance the propertydefinitation column holds numbers, so if I want to find number 20, and then map the propertyvalue column entry to the sUserPrefix variable as long as the value in the visitbiity column equal 2.

Hope this make some sence. I have been pulling out my hair trying to figure this outSniff | :^) .

Below is the code I have come up with so far and as you can see I'm just learning, so any help would he appreciated.

Public Sub GetDataFromDB( _
        ByVal sEmail As String, _
        ByVal sDisplayName As String, _
        ByVal sFname As String, _
        ByVal sLname As String, _
        ByVal sPropertyDefinitionID As Decimal, _
        ByVal sUserID As Decimal, _
        ByVal sPropertyText As String, _
        ByVal sPrefix As String, _
        ByVal sMiddleName As String, _
        ByVal sSuffix As String, _
        ByVal PropertyValue As String, _
        ByVal Visitbiity As Integer, _
        ByVal sTelephone As String, _
        ByVal sCity As String, _
        ByVal sRegion As String, _
        ByVal sState As String, _
        ByVal sCountry As String, _
        ByVal sBio As String)


        Dim Conn As String = System.Configuration.ConfigurationManager.ConnectionStrings("SiteSQLServer").ConnectionString
        Dim myConnection As System.Data.SqlClient.SqlConnection = New System.Data.SqlClient.SqlConnection(Conn)
        Dim mySQL As String = "P4YS_GetBioInfo"

        Try
            Dim cmd As System.Data.SqlClient.SqlCommand = New System.Data.SqlClient.SqlCommand(mySQL, myConnection)
            cmd.CommandType = Data.CommandType.StoredProcedure
            'need to pass UserID Parameter to the system for the Stored Procedure
            cmd.Parameters.AddWithValue("@UserID", sUserID)
            myConnection.Open()
            Dim myReader As Data.SqlClient.SqlDataReader = cmd.ExecuteReader

            'Date Returned from database map entries to 
            sEmail = "Email"
            sDisplayName = "DisplayName"
            sFname = "FirstName"
            sLname = "LastName"

            'Search through PropertyDefinition for each of these values and set a varialble to them
            'Where propertyDefinitation 
            ' 20 = sUserPrefix and visibility = 2
            'sPrefix = 
            ' 22 = Middle Name and visibility = 2
            'sMiddleName = 
            ' 24 = Suffix and visibility = 2
            'sSuffix = 
            ' 27 = City and visibility = 2
            'sCity = 
            ' 28 = Region and visibility = 2
            'sRegion = 
            ' 29 = Country and visibility = 2
            'sCountry = 
            ' 31 = Telephone Number and visibility = 2
            'sTelephone = 
            ' 36 = BIO and visibility = 2
            'sBio = 


        Catch ex As Exception

        Finally
            CType(myConnection, IDisposable).Dispose()
        End Try

    End Sub


Chris Stewart

www.pluginforsuccess.com

QuestionASP.net ReorderList Control /w Many Items Pin
expinch1-Nov-07 17:18
expinch1-Nov-07 17:18 
QuestionToolBox Problem Pin
beatles16921-Nov-07 15:32
beatles16921-Nov-07 15:32 
AnswerRe: ToolBox Problem Pin
Christian Graus1-Nov-07 17:39
protectorChristian Graus1-Nov-07 17:39 
QuestionCustom control collapseble panel Pin
matsnas1-Nov-07 12:28
matsnas1-Nov-07 12:28 
AnswerRe: Custom control collapseble panel Pin
Not Active1-Nov-07 16:25
mentorNot Active1-Nov-07 16:25 
AnswerRe: Custom control collapseble panel Pin
N a v a n e e t h1-Nov-07 20:33
N a v a n e e t h1-Nov-07 20:33 
QuestionError: 'theForm.__SCROLLPOSITIONX' is null or not an object Pin
gates091-Nov-07 9:16
gates091-Nov-07 9:16 
QuestionGrid View Delete Command. Pin
Dio221-Nov-07 8:40
Dio221-Nov-07 8:40 
AnswerRe: Grid View Delete Command. Pin
Dio221-Nov-07 9:56
Dio221-Nov-07 9:56 
QuestionImporting Controls made in Visual C# into ASP.NET Pin
jblouir1-Nov-07 6:59
jblouir1-Nov-07 6:59 
AnswerRe: Importing Controls made in Visual C# into ASP.NET Pin
Christian Graus1-Nov-07 10:49
protectorChristian Graus1-Nov-07 10:49 
AnswerRe: Importing Controls made in Visual C# into ASP.NET Pin
Pete O'Hanlon1-Nov-07 11:44
mvePete O'Hanlon1-Nov-07 11:44 
QuestionProblem in using EditItemTemplate of GridView while keeping the AutoGenerateEdit=false Pin
Rocky#1-Nov-07 5:29
Rocky#1-Nov-07 5:29 
QuestionASP.Net & C# Pin
KBM731-Nov-07 4:50
KBM731-Nov-07 4:50 
AnswerRe: ASP.Net & C# Pin
pmarfleet1-Nov-07 6:06
pmarfleet1-Nov-07 6:06 
QuestionSQLDataSource Pin
recono11-Nov-07 4:38
recono11-Nov-07 4:38 
AnswerRe: SQLDataSource Pin
dataminers1-Nov-07 6:59
dataminers1-Nov-07 6:59 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.