15,886,362 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by alex_78 (Top 2 by date)
alex_78
8-Apr-14 9:17am
View
i just still have the problem with the parameter in the javascript. I don't know how to declare the function.
alex_78
8-Apr-14 5:04am
View
I have this file RetrievalMask.aspx which is the site with the button. It is the search Button which is disabled.
<pre lang="xml"><%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="RetrievalMask.aspx.cs" Inherits="Retrieval.RetrievalMask" %>
<%@ Register assembly="DevExpress.Web.v13.2, Version=13.2.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxEditors" tagprefix="dx" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
<title></title>
<script type="text/javascript">
function ValidateButton()
{
}
</script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<div class="dropDown">
<asp:DropDownList runat="server" ID="dropDown" ItemType="Retrieval.RetrievalMask" SelectMethod="FillDropDown" Width="400px" OnSelectedIndexChanged="dropDown_SelectedIndexChanged" AutoPostBack="true" >
</asp:DropDownList>
</div>
<br />
<asp:Panel id="searchMask" runat="server"></asp:Panel>
<br />
<div>
<asp:Button ID="cancel" runat="server" Text="cancel" Visible="false"/>
<asp:Button ID="search" runat="server" Text="search" OnClick="search_Click"/>
</div>
<br />
<div>
<span id="message" runat="server" visible="false">No documents found</span>
</div>
</asp:Content></pre>
--------------------------------------------------
here is the class where i create the textbox. It is in the function SetSearchFieldProperties()
private void SetSearchFieldProperties(ref Control c, RetrievalFieldClass rf)
{
try
{
if (c is TextBox)
{
((TextBox)c).Attributes.Add("runat", "server");
((TextBox)c).Width = 155;
((TextBox)c).TextChanged += new EventHandler(textBox_TextChanged);
((TextBox)c).AutoPostBack = true; // ????
((TextBox)c).Attributes.Add("onclick", "ValidateButton(this.id);");
}
else
{
if (c is DropDownList)
{
((DropDownList)c).Width = 160;
((DropDownList)c).SelectedIndexChanged += new EventHandler(dropDownLookUp_SelectedIndexChanged);
//((DropDownList)c).AutoPostBack = true;
((DropDownList)c).Items.Clear();
((DropDownList)c).Items.Add("");
foreach (string str in rf._lookUpList.Values) //set the lookup longname values in the DropDownList
((DropDownList)c).Items.Add(str);
}