Click here to Skip to main content
16,020,741 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Help on ecommerce web programming Pin
Not Active8-Jan-09 17:19
mentorNot Active8-Jan-09 17:19 
GeneralRe: Help on ecommerce web programming Pin
atplerry12-Jan-09 0:37
atplerry12-Jan-09 0:37 
QuestionWhy does web.config automatically save itself? Pin
Tomz_KV8-Jan-09 10:06
Tomz_KV8-Jan-09 10:06 
AnswerRe: Why does web.config automatically save itself? Pin
Jon Rista8-Jan-09 10:18
Jon Rista8-Jan-09 10:18 
QuestionBest third party components suite for Asp.Net Ajax Pin
lotuzwine8-Jan-09 9:57
lotuzwine8-Jan-09 9:57 
AnswerRe: Best third party components suite for Asp.Net Ajax Pin
ToddHileHoffer8-Jan-09 10:19
ToddHileHoffer8-Jan-09 10:19 
GeneralRe: Best third party components suite for Asp.Net Ajax Pin
lotuzwine9-Jan-09 1:40
lotuzwine9-Jan-09 1:40 
QuestionSaving data from a placeholder control [modified] Pin
AllPhee8-Jan-09 4:41
AllPhee8-Jan-09 4:41 
Hi everyone,

I have a problem in getting values from dropdown lists in a placeholder control.
I would really appreciate your help.

I first programatically create the controls in placeholder
,I also allow the user to add a new row of the same controls.

I am able to track the precice number of rows and controls at page load and everytime a new row is added.

But when i want to insert the data the placeholder.controls is set to zero.

Can u please examine my code and advice me why is this.

Protected Sub btnQuotation_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnQuotation.Click
        Dim insertCommand As SqlCommand

        Dim strConnection As String = "Data Source=xxxxx;Initial Catalog=xxxxx;Integrated Security=True"

        Dim objConnection As New SqlConnection(strConnection)

        objConnection.Open()


        Dim strRoom As String
        Dim PRTId As Integer
        Dim RateType, Smoking As String
        Dim NoRooms, Nopeople, NoChildren As Integer

For Each con As Control In phBooking.Controls ''!!!This is the error Line
            strRoom = "INSERT INTO tblRoomTrans(FkPRTId,RateType)
                      VALUES (@PRTId, @RateType)"
            insertCommand = New SqlCommand(strRoom, objConnection)
            If TypeOf con Is DropDownList And con.ID = "DDLRooms" & (txtRows.Text) Then
                PRTId = CType(con, DropDownList).SelectedValue
                insertCommand.Parameters.AddWithValue("@PRTId", PRTId)
            End If

            If TypeOf con Is DropDownList And con.ID = "DDLRateType" & (txtRows.Text) Then
                RateType = CType(con, DropDownList).SelectedValue
                insertCommand.Parameters.AddWithValue("@RateType", RateType)
            End If

           
           insertCommand.ExecuteNonQuery()
        Next

        Response.Redirect("NextPage.aspx")

    End Sub


allphpro

modified on Thursday, January 8, 2009 11:01 AM

AnswerRe: Saving data from a placeholder control Pin
Not Active8-Jan-09 5:35
mentorNot Active8-Jan-09 5:35 
GeneralRe: Saving data from a placeholder control Pin
ToddHileHoffer8-Jan-09 6:06
ToddHileHoffer8-Jan-09 6:06 
GeneralRe: Saving data from a placeholder control Pin
AllPhee9-Jan-09 1:01
AllPhee9-Jan-09 1:01 
QuestionGive permision for ActiveX control Pin
hemant.kaushal8-Jan-09 2:56
hemant.kaushal8-Jan-09 2:56 
AnswerRe: Give permision for ActiveX control Pin
Nagarjuna Dilip6-May-09 20:20
professionalNagarjuna Dilip6-May-09 20:20 
Questionupdate progress bar Pin
Gaurav Agrawal (Planetofcoders.com)8-Jan-09 2:35
Gaurav Agrawal (Planetofcoders.com)8-Jan-09 2:35 
AnswerRe: update progress bar Pin
ToddHileHoffer8-Jan-09 2:48
ToddHileHoffer8-Jan-09 2:48 
AnswerRe: update progress bar Pin
Christian Graus8-Jan-09 2:58
protectorChristian Graus8-Jan-09 2:58 
QuestionCOLUMN WISE DISPLAYING TWO QUERIE VALUE FROM DATASET TO GRIDVIEW Pin
Karan_TN8-Jan-09 1:09
Karan_TN8-Jan-09 1:09 
AnswerRe: COLUMN WISE DISPLAYING TWO QUERIE VALUE FROM DATASET TO GRIDVIEW Pin
sudhanvag8-Jan-09 2:00
sudhanvag8-Jan-09 2:00 
AnswerRe: COLUMN WISE DISPLAYING TWO QUERIE VALUE FROM DATASET TO GRIDVIEW Pin
Ashfield8-Jan-09 2:14
Ashfield8-Jan-09 2:14 
GeneralRe: COLUMN WISE DISPLAYING TWO QUERIE VALUE FROM DATASET TO GRIDVIEW Pin
Abhijit Jana8-Jan-09 2:17
professionalAbhijit Jana8-Jan-09 2:17 
GeneralRe: COLUMN WISE DISPLAYING TWO QUERIE VALUE FROM DATASET TO GRIDVIEW Pin
Ashfield8-Jan-09 2:35
Ashfield8-Jan-09 2:35 
GeneralRe: COLUMN WISE DISPLAYING TWO QUERIE VALUE FROM DATASET TO GRIDVIEW Pin
Karan_TN8-Jan-09 22:47
Karan_TN8-Jan-09 22:47 
GeneralRe: COLUMN WISE DISPLAYING TWO QUERIE VALUE FROM DATASET TO GRIDVIEW Pin
Ashfield9-Jan-09 1:24
Ashfield9-Jan-09 1:24 
AnswerRe: COLUMN WISE DISPLAYING TWO QUERIE VALUE FROM DATASET TO GRIDVIEW Pin
ToddHileHoffer8-Jan-09 2:22
ToddHileHoffer8-Jan-09 2:22 
GeneralRe: COLUMN WISE DISPLAYING TWO QUERIE VALUE FROM DATASET TO GRIDVIEW Pin
sudhanvag19-Jan-09 1:37
sudhanvag19-Jan-09 1:37 

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.