Click here to Skip to main content
15,888,968 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: url routing like as subdomain in asp.Net web Forms c# Pin
Jasmine25016-May-13 7:10
Jasmine25016-May-13 7:10 
GeneralRe: url routing like as subdomain in asp.Net web Forms c# Pin
abdussalam1436-May-13 20:06
professionalabdussalam1436-May-13 20:06 
QuestionPost Info to Particular Pages in FaceBook Pin
prasanth1002-May-13 9:25
prasanth1002-May-13 9:25 
AnswerRe: Post Info to Particular Pages in FaceBook Pin
Jasmine25013-May-13 5:29
Jasmine25013-May-13 5:29 
Questionwebform performance Pin
gaigoi1132-May-13 6:56
gaigoi1132-May-13 6:56 
AnswerRe: webform performance Pin
jkirkerx2-May-13 7:01
professionaljkirkerx2-May-13 7:01 
GeneralRe: webform performance Pin
gaigoi1132-May-13 7:15
gaigoi1132-May-13 7:15 
GeneralRe: webform performance Pin
jkirkerx2-May-13 9:26
professionaljkirkerx2-May-13 9:26 
Your Welcome

That's a popular question,

I use to bind years ago, but overall in the end, the bindings have to be recreated if you move your project to another server or something. And it was so slow, because the binding code has to be created every time it's used.

So you create a function to load the data, and package the data in a class or structure, and loop through the class or structure records. Something like below code, that's just off the top of my head in vb, but you should get the idea.

Public Structure structure_States
     Public p_StateName as string
     Public p_StateAbbr as string
End Structure

Public Sub load_States()

     ddl_StateNames_Field.Items.Clear
     Dim p_stateCount as Integer = get_StateNames_Count()
     Dim sSn(p_stateCount) as structure_States
     Dim dwExitCode as Integer = load_StateNames(sSn)
     
     if (0 = dwExitCode) then
      For idx as Integer = 0 to sSn.length - 1
          ddl_StateNames.Item.add(new ListItem(sSn(idx).p_StateName, sSn(idx).p_stateAbbr))
      Next
    end if

end Sub
Public Function load_StateNames(ByRef s_StateNames() as structure_States) As Integer

     Dim dwExitCode as Integer = 2
     'Do Database Read

     return dwExitCode

End Function

QuestionASP.NET Tutorials Pin
Clark Kent1232-May-13 4:48
professionalClark Kent1232-May-13 4:48 
AnswerRe: ASP.NET Tutorials Pin
Jasmine25012-May-13 5:46
Jasmine25012-May-13 5:46 
GeneralRe: ASP.NET Tutorials Pin
Clark Kent1232-May-13 6:41
professionalClark Kent1232-May-13 6:41 
AnswerRe: ASP.NET Tutorials Pin
David Mujica2-May-13 9:42
David Mujica2-May-13 9:42 
GeneralRe: ASP.NET Tutorials Pin
Clark Kent1232-May-13 9:56
professionalClark Kent1232-May-13 9:56 
AnswerRe: ASP.NET Tutorials Pin
thewazz4-May-13 19:03
professionalthewazz4-May-13 19:03 
GeneralRe: ASP.NET Tutorials Pin
Clark Kent1236-May-13 2:04
professionalClark Kent1236-May-13 2:04 
QuestionFacebook checkin using Graph API Pin
Blikkies2-May-13 1:11
professionalBlikkies2-May-13 1:11 
AnswerRe: Facebook checkin using Graph API Pin
Jasmine25012-May-13 5:39
Jasmine25012-May-13 5:39 
GeneralRe: Facebook checkin using Graph API Pin
Blikkies2-May-13 20:57
professionalBlikkies2-May-13 20:57 
GeneralRe: Facebook checkin using Graph API Pin
Jasmine25013-May-13 5:12
Jasmine25013-May-13 5:12 
Questionvbs in c# web application Pin
Sandeep Singh Negi30-Apr-13 20:13
Sandeep Singh Negi30-Apr-13 20:13 
AnswerRe: vbs in c# web application Pin
jkirkerx1-May-13 6:43
professionaljkirkerx1-May-13 6:43 
AnswerRe: vbs in c# web application Pin
Bernhard Hiller1-May-13 22:33
Bernhard Hiller1-May-13 22:33 
GeneralRe: vbs in c# web application Pin
Sandeep Singh Negi1-May-13 22:55
Sandeep Singh Negi1-May-13 22:55 
AnswerRe: vbs in c# web application Pin
Sandeep Singh Negi1-May-13 22:49
Sandeep Singh Negi1-May-13 22:49 
GeneralRe: vbs in c# web application Pin
jkirkerx2-May-13 7:21
professionaljkirkerx2-May-13 7:21 

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.