INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

PostBack returning PDF

PostBack returning PDF

(OP)
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>
        <asp:DropDownList CssClass="body" ID="ddlMarque" runat="server" DataSourceID="MarqueDataSource" DataTextField="MarqueName" DataValueField="MarqueID" AutoPostBack="true"  >
        </asp:DropDownList>
        <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

RE: PostBack returning PDF

l;jk

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close