www.webdeveloper.com
Results 1 to 2 of 2

Thread: Name 'FilterSelect' is not declared...

  1. #1
    Join Date
    Apr 2004
    Posts
    27

    Name 'FilterSelect' is not declared...

    Probably another easy one but I can't figure out why it's giving me this error.




    Compiler Error Message: BC30451: Name 'FilterSelect' is not declared.

    Source Error:



    Line 89: Sub Filter_Action(sender As Object, e As EventArgs)
    Line 90:
    Line 91: sFilterID = FilterSelect.SelectedItem.Value
    Line 92:
    Line 93: If sFilterID <> "" Then


    Source File: F:\WSD\DOX\text.aspx Line: 91


    Microsoft (R) Visual Basic .NET Compiler version 7.00.9466
    for Microsoft (R) .NET Framework version 1.00.3705.288
    Copyright (C) Microsoft Corporation 1987-2001. All rights reserved.

    F:\WSD\DOX\text.aspx(91) : error BC30451: Name 'FilterSelect' is not declared.

    sFilterID = FilterSelect.SelectedItem.Value
    ~~~~~~~~~~~~


    Show Complete Compilation Source:


    Line 1: '------------------------------------------------------------------------------
    Line 2: ' <autogenerated>
    Line 3: ' This code was generated by a tool.
    Line 4: ' Runtime Version: 1.0.3705.288
    Line 5: '
    Line 6: ' Changes to this file may cause incorrect behavior and will be lost if
    Line 7: ' the code is regenerated.
    Line 8: ' </autogenerated>
    Line 9: '------------------------------------------------------------------------------
    Line 10:
    Line 11: Option Strict Off
    Line 12: Option Explicit On
    Line 13:
    Line 14: Imports Microsoft.VisualBasic
    Line 15: Imports System
    Line 16: Imports System.Collections
    Line 17: Imports System.Collections.Specialized
    Line 18: Imports System.Configuration
    Line 19: Imports System.Data
    Line 20: Imports System.Data.SqlClient
    Line 21: Imports System.Text
    Line 22: Imports System.Text.RegularExpressions
    Line 23: Imports System.Web
    Line 24: Imports System.Web.Caching
    Line 25: Imports System.Web.Security
    Line 26: Imports System.Web.SessionState
    Line 27: Imports System.Web.UI
    Line 28: Imports System.Web.UI.HtmlControls
    Line 29: Imports System.Web.UI.WebControls
    Line 30:
    Line 31: Namespace ASP
    Line 32:
    Line 33: <System.Runtime.CompilerServices.CompilerGlobalScopeAttribute()> _
    Line 34: Public Class text_aspx
    Line 35: Inherits System.Web.UI.Page
    Line 36: Implements System.Web.SessionState.IRequiresSessionState
    Line 37:
    Line 38: Private Shared __autoHandlers As Integer
    Line 39:
    Line 40: Private Shared __intialized As Boolean = false
    Line 41:
    Line 42: Private Shared __stringResource As Object
    Line 43:
    Line 44: Private Shared __fileDependencies As System.Collections.ArrayList
    Line 45:
    Line 46:
    Line 47: #ExternalSource("F:\WSD\DOX\text.aspx",9)
    Line 48:
    Line 49:
    Line 50: Public dtrSource As SqlDataReader
    Line 51: Public cmdSelectSource As SqlCommand
    Line 52: Public sPageID, sNameID, sTitleID, sFilterID as String
    Line 53:
    Line 54: Sub Load_Page()
    Line 55:
    Line 56: Dim sFilePath, sAuthorName, sWorksTitle, sNLink, sTLink, sRecordField as String
    Line 57:
    Line 58: sPageID = Request.QueryString("page_id")
    Line 59: sNameID = Request.QueryString("name_id")
    Line 60: sTitleID = Request.QueryString("title_id")
    Line 61: sFilterID = Request.QueryString("filter_id")
    Line 62:
    Line 63: If sPageID <> "" And sNameID = "" Then
    Line 64: Response.Write("<table width=""300"" border=""1"" align=""center"" cellpadding=""5"" cellspacing=""2"" class=""tbllists"">")
    Line 65: Call Run_Query()
    Line 66: While dtrSource.Read()
    Line 67: sAuthorName = dtrSource("Name")
    Line 68: sNLink = dtrSource("NLink")
    Line 69: Response.Write("<tr><td>" + "<a href = ""text.aspx?page_id=" + sPageID + "&name_id=" + sNLink + "&order_id=Title"">" + sAuthorName + "</a>" + "</td></tr>")
    Line 70: End While
    Line 71: dtrSource.Close()
    Line 72: cmdSelectSource.connection.close
    Line 73: Response.Write("</table>")
    Line 74: ElseIf sPageID <> "" And sNameID <> "" And sTitleID = "" Then
    Line 75: Response.Write("<table width=""300"" border=""1"" align=""center"" cellpadding=""5"" cellspacing=""2"" class=""tbllists"">")
    Line 76: Call Run_Query()
    Line 77: While dtrSource.Read()
    Line 78: sWorksTitle = dtrSource("Title")
    Line 79: sTLink = dtrSource("TLink")
    Line 80: sNLink = dtrSource("NLink")
    Line 81: Response.Write("<tr><td>" + "<a href = ""text.aspx?page_id=" + sPageID + "&name_id=" + sNLink + "&title_id=" + sTLink + """>" + sWorksTitle + "</td></tr>" + "</a>")
    Line 82: End While
    Line 83: dtrSource.Close()
    Line 84: cmdSelectSource.connection.close
    Line 85: Response.Write("</table>")
    Line 86: ElseIf sPageID <> "" And sNameID <> "" And sTitleID <> "" Then
    Line 87: sFilePath = "txt/" + sNameID + "/" + sTitleID + ".html"
    Line 88: Server.Execute(sFilePath)
    Line 89: End If
    Line 90:
    Line 91: End Sub
    Line 92:
    Line 93: Public Sub Run_Query()
    Line 94: Dim conText As SqlConnection
    Line 95:
    Line 96:
    Line 97: conText = New SQLConnection("Server=DOX;Database=integration;User ID=sa;Password=")
    Line 98: conText.Open()
    Line 99:
    Line 100: If sPageID <> "" And sNameID = "" Then
    Line 101: cmdSelectSource = New SqlCommand( "SELECT Distinct dbo.tblTextSource.Name, dbo.tblTextTitles.Type, dbo.tblTextSource.Nlink FROM dbo.tblTextSource INNER JOIN dbo.tblTextTitles ON dbo.tblTextSource.ID = dbo.tblTextTitles.Source WHERE dbo.tblTextSource.Name Like '" & sFilterID & "%' And dbo.tblTextTitles.Type = '" & sPageID & "' ORDER BY dbo.tblTextSource.Name", conText)
    Line 102: dtrSource = cmdSelectSource.ExecuteReader()
    Line 103: Elseif sPageID <> "" And sNameID <> "" Then
    Line 104: cmdSelectSource = New SqlCommand( "SELECT dbo.tblTextSource.Nlink, dbo.tblTextTitles.Title, dbo.tblTextTitles.Type, dbo.tblTextTitles.Tlink FROM dbo.tblTextSource INNER JOIN dbo.tblTextTitles ON dbo.tblTextSource.ID = dbo.tblTextTitles.Source WHERE dbo.tblTextTitles.Title Like '" & sFilterID & "%' And dbo.tblTextSource.NLink = '" & sNameID & "' AND dbo.tblTextTitles.Type = '" & sPageID & "' ORDER BY dbo.tblTextTitles.Title", conText)
    Line 105: dtrSource = cmdSelectSource.ExecuteReader()
    Line 106: End If
    Line 107:
    Line 108: End Sub
    Line 109:
    Line 110: Sub Filter_Module()
    Line 111:
    Line 112: If sTitleID = "" Then
    Line 113: With Response
    Line 114: .Write("<asp:dropdownlist AutoPostBack=""true"" runat=""server"" ID=""FilterSelect"" onSelectedIndexChanged=""Filter_Action"">")
    Line 115:
    Line 116: .Write("<asp:ListItem value=""[a-z]"" selected=""True""> A-Z </asp:ListItem>")
    Line 117: .Write("<asp:ListItem value=""[a-g]"" selected=""True""> A-G </asp:ListItem>")
    Line 118: .Write("<asp:ListItem value=""[h-l]"" selected=""True""> H-L </asp:ListItem>")
    Line 119: .Write("<asp:ListItem value=""[m-q]"" selected=""True""> M-Q </asp:ListItem>")
    Line 120: .Write("<asp:ListItem value=""[r-z]"" selected=""True""> R-Z </asp:ListItem>")
    Line 121:
    Line 122: .Write("</asp:dropdownlist>")
    Line 123: End With
    Line 124: End If
    Line 125:
    Line 126: End Sub
    Line 127:
    Line 128: Sub Filter_Action(sender As Object, e As EventArgs)
    Line 129:
    Line 130: sFilterID = FilterSelect.SelectedItem.Value
    Line 131:
    Line 132: If sFilterID <> "" Then
    Line 133: Response.Redirect("text.aspx?page_id=" + sPageID + "&name_id=" + sNameID + "&filter_id=" + sFilterID)
    Line 134: End If
    Line 135:
    Line 136: End Sub
    Line 137:
    Line 138:

  2. #2
    Join Date
    Apr 2004
    Posts
    27

    Cancel../../

    I think it was the Response.Write of the ASP Controls that screwed up the code stack. I found an alternative for what I wanted to do and the problem is fixed.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center

"

"

X vBulletin 4.2.2 Debug Information

  • Page Generation 0.16082 seconds
  • Memory Usage 2,851KB
  • Queries Executed 13 (?)
More Information
Template Usage (32):
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_global_above_footer
  • (1)ad_global_below_navbar
  • (1)ad_global_header1
  • (1)ad_global_header2
  • (1)ad_navbar_below
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)ad_thread_first_post_content
  • (1)ad_thread_last_post_content
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)headinclude_bottom
  • (2)memberaction_dropdown
  • (1)navbar
  • (4)navbar_link
  • (1)navbar_moderation
  • (1)navbar_noticebit
  • (1)navbar_tabs
  • (2)option
  • (2)postbit
  • (2)postbit_onlinestatus
  • (2)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available (6):
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files (26):
  • ./showthread.php
  • ./global.php
  • ./includes/class_bootstrap.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/functions_navigation.php
  • ./includes/class_friendly_url.php
  • ./includes/class_hook.php
  • ./includes/class_bootstrap_framework.php
  • ./vb/vb.php
  • ./vb/phrase.php
  • ./includes/functions_facebook.php
  • ./includes/functions_calendar.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_notice.php
  • ./packages/vbattach/attach.php
  • ./vb/types.php
  • ./vb/cache.php
  • ./vb/cache/db.php
  • ./vb/cache/observer/db.php
  • ./vb/cache/observer.php 

Hooks Called (70):
  • init_startup
  • friendlyurl_resolve_class
  • init_startup_session_setup_start
  • database_pre_fetch_array
  • database_post_fetch_array
  • init_startup_session_setup_complete
  • global_bootstrap_init_start
  • global_bootstrap_init_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • load_show_variables
  • load_forum_show_variables
  • global_state_check
  • global_bootstrap_complete
  • global_start
  • style_fetch
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • strip_bbcode
  • friendlyurl_clean_fragment
  • friendlyurl_geturl
  • forumjump
  • cache_templates
  • cache_templates_process
  • template_register_var
  • template_render_output
  • fetch_template_start
  • fetch_template_complete
  • parse_templates
  • fetch_musername
  • notices_check_start
  • notices_noticebit
  • process_templates_complete
  • friendlyurl_redirect_canonical
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • memberaction_dropdown
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • build_navigation_data
  • build_navigation_array
  • check_navigation_permission
  • process_navigation_links_start
  • process_navigation_links_complete
  • set_navigation_menu_element
  • build_navigation_menudata
  • build_navigation_listdata
  • build_navigation_list
  • set_navigation_tab_main
  • set_navigation_tab_fallback
  • navigation_tab_complete
  • fb_like_button
  • showthread_complete
  • page_templates