Click here to Skip to main content
15,907,326 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Communicate From ASP.net Website to a VB.net Application on the computer Pin
s.v.nagendra rao5-Jan-07 18:07
s.v.nagendra rao5-Jan-07 18:07 
Questionusing pdf's in .NET Pin
patkoeh5-Jan-07 4:53
patkoeh5-Jan-07 4:53 
AnswerRe: using pdf's in .NET Pin
Pradipta Basu5-Jan-07 9:23
Pradipta Basu5-Jan-07 9:23 
GeneralRe: using pdf's in .NET Pin
patkoeh8-Jan-07 4:03
patkoeh8-Jan-07 4:03 
GeneralRe: using pdf's in .NET Pin
Pradipta Basu10-Jan-07 7:05
Pradipta Basu10-Jan-07 7:05 
AnswerRe: using pdf's in .NET Pin
Vasudevan Deepak Kumar5-Jan-07 22:06
Vasudevan Deepak Kumar5-Jan-07 22:06 
GeneralRe: using pdf's in .NET Pin
patkoeh8-Jan-07 4:00
patkoeh8-Jan-07 4:00 
QuestionMultiple use of one SqlDataSource Control Pin
Quecumber2565-Jan-07 3:50
Quecumber2565-Jan-07 3:50 
I have a web application data entry form and on the form I need to populate four drop down lists from four different database tables.

I placed ONE SqlDataSource control on the web page and in the Page_Load subroutine I placed the following code.

Protected Sub Page_Load(ByVal sender As Object, _
ByVal e As System.EventArgs) _
Handles Me.Load
'Retrieve the datasource connection string from the Web.Config file
DtaSource.ConnectionString = MRMFunctions.WebConfigConnString
'Retrieve Employee titles from the database
Dim strTitleSQL = "SELECT * FROM tblTitles WHERE [Deleted] = 0;"
DtaSource.SelectCommand = strTitleSQL
cboTitle.DataSourceID = DtaSource.ID.ToString
cboTitle.DataTextField = "Title"
cboTitle.DataValueField = "TitleID"
DtaSource.Dispose()
'Retrieve the department names from the database
Dim strDeptSQL = "SELECT * FROM tblDepartments WHERE [Deleted] = 0;"
DtaSource.SelectCommand = strDeptSQL
cboDept.DataSourceID = DtaSource.ID.ToString
cboDept.DataTextField = "Department"
cboDept.DataValueField = "DeptID"
DtaSource.Dispose()
'Retrieve the address types from the database
Dim strAddrTypeSQL = "SELECT * FROM tblAddressTypes WHERE [Deleted] = 0;"
DtaSource.SelectCommand = strAddrTypeSQL
cboAddrType.DataSourceID = DtaSource.ID.ToString
cboAddrType.DataTextField = "AddressType"
cboAddrType.DataValueField = "AddressTypeID"
DtaSource.Dispose()
'Retrieve state names from the database
Dim strStateSQL = "SELECT * FROM tblStates;"
DtaSource.SelectCommand = strStateSQL
cboAddrType.DataSourceID = DtaSource.ID.ToString
cboAddrType.DataTextField = "StateAbbr"
cboAddrType.DataValueField = "StateID"
DtaSource.Dispose()
End Sub

When I run the form I get the following error:
Server Error in ‘/DataEntry’ Application
DataBinding: ‘System.Data.DataRowView’ does not contain a property with the name ‘Title’. I assume this error is being caused by the next set of databinding instructions(Retrieve the department names), because the resources are not being released after the first combo box is populated.

The funny thing is: When I place another SqlDataSource control on the page and modify the second set of data retrival instructions to access this control. The second combo box is populated correctly(no surprise here).

There has got to be a way I can get away with using only one SqlDataSource control, but my extreme lack of ASP.NET experience is hindering my efforts. Does anyone know a way of accomplishing this task?

Thank you,


Quecumber256
AnswerRe: Multiple use of one SqlDataSource Control Pin
ednrgc5-Jan-07 4:24
ednrgc5-Jan-07 4:24 
GeneralRe: Multiple use of one SqlDataSource Control Pin
Quecumber2565-Jan-07 4:46
Quecumber2565-Jan-07 4:46 
GeneralRe: Multiple use of one SqlDataSource Control Pin
aransiola5-Jan-07 5:53
aransiola5-Jan-07 5:53 
Questionaccount validation in asp.net Pin
Guy Harwood5-Jan-07 3:03
Guy Harwood5-Jan-07 3:03 
AnswerRe: account validation in asp.net Pin
Mark J. Miller5-Jan-07 3:30
Mark J. Miller5-Jan-07 3:30 
GeneralRe: account validation in asp.net Pin
Guy Harwood5-Jan-07 3:33
Guy Harwood5-Jan-07 3:33 
QuestionDatabinding a ListBox to List Pin
JambeDuSinge5-Jan-07 2:22
JambeDuSinge5-Jan-07 2:22 
AnswerRe: Databinding a ListBox to List Pin
minhpc_bk5-Jan-07 16:26
minhpc_bk5-Jan-07 16:26 
GeneralRe: Databinding a ListBox to List Pin
JambeDuSinge5-Jan-07 20:36
JambeDuSinge5-Jan-07 20:36 
GeneralRe: Databinding a ListBox to List Pin
minhpc_bk5-Jan-07 21:14
minhpc_bk5-Jan-07 21:14 
GeneralRe: Databinding a ListBox to List Pin
JambeDuSinge5-Jan-07 22:56
JambeDuSinge5-Jan-07 22:56 
QuestionPassword Encryption function Pin
Arindam Tewary5-Jan-07 1:13
professionalArindam Tewary5-Jan-07 1:13 
AnswerRe: Password Encryption function Pin
Imran Khan Pathan5-Jan-07 1:57
Imran Khan Pathan5-Jan-07 1:57 
AnswerRe: Password Encryption function Pin
enjoycrack5-Jan-07 15:51
enjoycrack5-Jan-07 15:51 
AnswerRe: Password Encryption function Pin
Vasudevan Deepak Kumar5-Jan-07 22:07
Vasudevan Deepak Kumar5-Jan-07 22:07 
QuestionSubmit the form when Hits ENTER key Pin
Jay_se5-Jan-07 0:08
Jay_se5-Jan-07 0:08 
AnswerRe: Submit the form when Hits ENTER key Pin
enjoycrack5-Jan-07 0:11
enjoycrack5-Jan-07 0:11 

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.