InputValidator not declared

Discussion in 'ASP.NET / ASP.NET Core' started by john27157, Oct 1, 2004.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. The code below on line 6 or 7 says "If InputValidator.IsSafeText(Request.QueryString("titleid"))", this line is giving me the compiler error "BC30451: Name 'InputValidator' is not declared."

    What do they mean by this? How do I fix this?

    Here's the code that I'm getting an error on:

    <%@ Import Namespace="System.Data" %>
    <%@ Import Namespace="System.Data.OleDb" %>
    <%@ Import Namespace="Acme" %>


    <html>

    <script language="VB" runat="server">

    Sub Page_Load(Sender As Object, E As EventArgs)
    If Not Request.QueryString("titleid") Is Nothing
    If InputValidator.IsSafeText(Request.QueryString("titleid"))
    Dim DS As DataSet
    Dim MyConnection As OleDbConnection
    Dim MyCommand As OleDbDataAdapter

    Dim Query As String
    Query = "select * from Titles where title_id = '" & Request.QueryString("titleid") & "'"

    MyConnection = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;data source=" & server.mappath("/fpdb/northwind.MDB"))
    MyCommand = New OleDbDataAdapter(Query, MyConnection)

    DS = New DataSet()
    MyCommand.Fill(DS, "Titles")

    MyDataList.DataSource = DS.Tables("Titles").DefaultView
    MyDataList.DataBind()
    End If
    End If
    End Sub


    Sub Submit_Click(Src As Object, E As EventArgs)

    Message.InnerHtml = "<h2>Purchase Made!!!</h2>"
    End Sub

    </script>



    <!-- #include virtual="/header.inc" -->

    <form runat="server">

    <table>
    <tr>
    <td valign="top">

    <ASP:DataList id="MyDataList" runat="server">

    <ItemTemplate>

    <table cellpadding=10 style="font: 10pt verdana">
    <tr>
    <td width=1 bgcolor="BD8672"/>
    <td valign="top">
    <img align="top" src='<%# DataBinder.Eval(Container.DataItem, "title_id", "/images/title-{0}.gif") %>' >
    </td>
    <td valign="top">
    Title: </b><%# DataBinder.Eval(Container.DataItem, "title") %>

    Category: </b><%# DataBinder.Eval(Container.DataItem, "type") %>

    Publisher ID: </b><%# DataBinder.Eval(Container.DataItem, "pub_id") %>

    Price: </b><%# DataBinder.Eval(Container.DataItem, "price", "$ {0}") %>

    </td>
    </tr>
    </table>

    </ItemTemplate>

    </ASP:DataList>

    </td>
    <td valign="top" style="padding-top:15;font: 10pt verdana">

    Thank you for your business! Please complete the form below to confirm your purchase.
    <p>
    <table style="font: 10pt verdana" cellpadding="3">
    <tr><td>Name: </b></td><td><input size="30" type="text" runat="server"></td></tr>
    <tr><td>Mailing Address: </b></td><td><input size="50" type="text" runat="server"></td></tr>
    <tr><td>Account Number: </b></td><td><input size="10" type="text" runat="server"></td></tr>
    </table>
    <p>
    <input type="submit" value="Purchase" runat="server" OnServerClick="Submit_Click"/>
    <p>

    </td>
    </tr>

    </table>

    <div style="font: 10pt verdana;padding:0,15,15,15" id="Message" runat="server"/>

    </form>

    <!-- #include virtual="/footer.inc" -->

    </body>
    </html>

    [:p]
     
  2. Put the qstools.dll in your bin directory.
    Acme is in there.
    Inputvalidator is declared in there.

    What a pain in the butt that was.
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page