Hi
I have created a usercontrol on my site this usercontrol consists of 4 dropdownlists. The 1st dropdrownlist when selected populates the 2nd dropdownlist (see below for an extract of the ascx file and the ascx.vb)
<div id="returnMarque" class="body">
<asp:Label Width="50px" ID="lblMarque" runat="server" Text="Marque:"></asp:Label>
<aspropDownList CssClass="body" ID="ddlMarque" runat="server" DataSourceID="MarqueDataSource" DataTextField="MarqueName" DataValueField="MarqueID" AutoPostBack="true" >
</aspropDownList>
<asp:SqlDataSource ID="MarqueDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:WestsRenaultConnection %>"
SelectCommand="GetAllMarques" SelectCommandType="StoredProcedure"></asp:SqlDataSource>
</div>
Protected Sub ddlMarque_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ddlMarque.SelectedIndexChanged
FillModel()
End Sub
Private Sub FillModel()
ddlModel.DataSource = GetModels(Integer.Parse(ddlMarque.SelectedValue))
ddlModel.DataTextField = "ModelName"
ddlModel.DataValueField = "ModelName"
ddlModel.DataBind()
End Sub
This all works fine but when I plug it into my main page when I select from the 1st dropdownlist it loads a PDF file. (There is reference to the PDF file in code when a user clicks a link).
Have you got any ideas as to why this may be happening and how this issue can be resolved.
Many Thanks
I have created a usercontrol on my site this usercontrol consists of 4 dropdownlists. The 1st dropdrownlist when selected populates the 2nd dropdownlist (see below for an extract of the ascx file and the ascx.vb)
<div id="returnMarque" class="body">
<asp:Label Width="50px" ID="lblMarque" runat="server" Text="Marque:"></asp:Label>
<aspropDownList CssClass="body" ID="ddlMarque" runat="server" DataSourceID="MarqueDataSource" DataTextField="MarqueName" DataValueField="MarqueID" AutoPostBack="true" >
</aspropDownList>
<asp:SqlDataSource ID="MarqueDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:WestsRenaultConnection %>"
SelectCommand="GetAllMarques" SelectCommandType="StoredProcedure"></asp:SqlDataSource>
</div>
Protected Sub ddlMarque_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ddlMarque.SelectedIndexChanged
FillModel()
End Sub
Private Sub FillModel()
ddlModel.DataSource = GetModels(Integer.Parse(ddlMarque.SelectedValue))
ddlModel.DataTextField = "ModelName"
ddlModel.DataValueField = "ModelName"
ddlModel.DataBind()
End Sub
This all works fine but when I plug it into my main page when I select from the 1st dropdownlist it loads a PDF file. (There is reference to the PDF file in code when a user clicks a link).
Have you got any ideas as to why this may be happening and how this issue can be resolved.
Many Thanks