locked
Compiler Error Message: BC30035: Syntax error. '&' RRS feed

  • Question

  • User2011366442 posted

    Hi everyone,

    This will be a simple solution im sure, all im trying to do is select a value from a dropdownlist (ddlname), hit submit (Where the problem lies) and place the results in the redirected page that carries the value in a querystring.

    Im under the impression that if you want to pass more then one value you use the concatenation symbol  "&", correct? If not what is it? (Using '+' doesnt work neither, just thought I would try it for the same of ruling that issue out

    Compiler Error Message: BC30035: Syntax error.

    Source Error:


    Line 9:      Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
    Line 10: Response.Redirect("Results.aspx?Name=?")
    Line 11: & Me.ddlName.selectedvalue.tostring())
    Line 12: End Sub
    Line 13: End Class

    Thursday, October 8, 2009 12:55 PM

Answers

  • User77042963 posted
            Response.Redirect("Results.aspx?Name=" & Me.ddlName.SelectedValue.ToString())
            'Or
            Response.Redirect("Results2.aspx?Name=" _
            & Me.ddlName.SelectedValue.ToString())


     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, October 8, 2009 2:38 PM