Click here to Skip to main content
16,008,299 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: selected index changed in listbox control Pin
shabonaa18-Apr-07 6:49
shabonaa18-Apr-07 6:49 
GeneralRe: selected index changed in listbox control Pin
kubben18-Apr-07 7:23
kubben18-Apr-07 7:23 
GeneralRe: selected index changed in listbox control Pin
shabonaa18-Apr-07 8:44
shabonaa18-Apr-07 8:44 
QuestionWizard Control Question Pin
Brent Lamborn17-Apr-07 9:16
Brent Lamborn17-Apr-07 9:16 
AnswerRe: Wizard Control Question Pin
Brent Lamborn17-Apr-07 9:48
Brent Lamborn17-Apr-07 9:48 
QuestionConnectionString Pin
musigati17-Apr-07 9:03
musigati17-Apr-07 9:03 
AnswerRe: ConnectionString Pin
Sandeep Akhare19-Apr-07 1:56
Sandeep Akhare19-Apr-07 1:56 
GeneralRe: ConnectionString Pin
musigati19-Apr-07 3:01
musigati19-Apr-07 3:01 
Sorry for that.The problem is in the codefile and this stopping me to run the application.
The error is in the aspx.vb code and here is the code: When run the application i got this one:" DArd.Fill(DSrd)--->connectionstring not initialized--<" which means that Dsrd has to be initialized somewhere.The following is the code:

Imports System.IO
Imports System.IO.Path
Imports System.Web.UI.Page
Imports System.Data.DataSet
Imports System.Data.DataTable
Imports System.Data.SqlClient


Partial Class _Default
Inherits System.Web.UI.Page


Public Function FillddList(ByVal ddList As String)
Dim SQLQuery As String 'SQL to fetch Data
Dim FieldText, FieldValue As String 'Name of the columns to add as text and as values...
Dim HeaderItem As New ListItem
Dim SelectAllItem As New ListItem
SQLQuery = ""
FieldText = ""
FieldValue = ""

Select Case ddList
Case "ddCategory"

SQLQuery = "SELECT * FROM PHOTOBANK TBL CATEGORY(dbo) ORDER BY " & "DESC E"
FieldText = "DESC E"
FieldValue = "DESC E"

HeaderItem.Value = ""
HeaderItem.Text = "Select a category"

SelectAllItem.Value = ""
SelectAllItem.Text = "All categories"

End Select

Dim DArd As SqlDataAdapter = New SqlDataAdapter(SQLQuery, oConn)
Dim DSrd As New Data.DataSet()
DArd.Fill(DSrd)


Dim xrd As DropDownList = CType(Me.FindControl(ddList), DropDownList)
xrd.DataSource = DSrd

xrd.DataTextField = DSrd.Tables.Item(0).Columns(FieldText).ToString
xrd.DataValueField = DSrd.Tables.Item(0).Columns(FieldValue).ToString

xrd.DataBind()

If SelectAllItem.Text <> "" Then
xrd.Items.Insert(0, SelectAllItem)
End If

If HeaderItem.Text <> "" Then
xrd.Items.Insert(0, HeaderItem)
End If

End Function

End Class
QuestionNumber of lines in a label control Pin
happyheartcs17-Apr-07 8:47
happyheartcs17-Apr-07 8:47 
AnswerRe: Number of lines in a label control Pin
kubben17-Apr-07 14:09
kubben17-Apr-07 14:09 
QuestionIIS6 App Mapping problem with .* file extension Pin
TOMCAT8117-Apr-07 6:24
TOMCAT8117-Apr-07 6:24 
AnswerRe: IIS6 App Mapping problem with .* file extension Pin
N a v a n e e t h17-Apr-07 18:26
N a v a n e e t h17-Apr-07 18:26 
GeneralRe: IIS6 App Mapping problem with .* file extension Pin
TOMCAT8117-Apr-07 19:18
TOMCAT8117-Apr-07 19:18 
QuestionAdvice needed... Pin
Software_Specialist17-Apr-07 5:41
Software_Specialist17-Apr-07 5:41 
AnswerRe: Advice needed... Pin
Tarakeshwar Reddy17-Apr-07 5:52
professionalTarakeshwar Reddy17-Apr-07 5:52 
AnswerRe: Advice needed... Pin
kinsella_john17-Apr-07 17:22
kinsella_john17-Apr-07 17:22 
AnswerRe: Advice needed... Pin
Russell Jones17-Apr-07 23:33
Russell Jones17-Apr-07 23:33 
QuestionHow to get toolbar button's coordinates Pin
aamn117-Apr-07 5:35
aamn117-Apr-07 5:35 
AnswerRe: How to get toolbar button's coordinates Pin
Sandeep Akhare19-Apr-07 2:01
Sandeep Akhare19-Apr-07 2:01 
Questiondynamic styles Pin
kkadir17-Apr-07 5:33
kkadir17-Apr-07 5:33 
AnswerRe: dynamic styles Pin
mghiassi17-Apr-07 7:28
mghiassi17-Apr-07 7:28 
AnswerRe: dynamic styles Pin
kinsella_john17-Apr-07 17:33
kinsella_john17-Apr-07 17:33 
GeneralRe: dynamic styles Pin
kkadir17-Apr-07 22:03
kkadir17-Apr-07 22:03 
AnswerRe: dynamic styles Pin
RichardGrimmer18-Apr-07 5:28
RichardGrimmer18-Apr-07 5:28 
QuestionDebuggingErrors Pin
TheEagle17-Apr-07 5:30
TheEagle17-Apr-07 5:30 

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.