dotnetspider.com
Login Login    Register      

TutorialsForumCareer DevelopmentResourcesReviewsJobsInterviewCommunitiesProjectsTraining

Subscribe to Subscribers
Talk to Webmaster
Tony John

Facebook
Google+
Twitter
LinkedIn
Online Membersnaveensanagasetti
Chandra
Shine S
Amruta
baiju
musathik
Kavery
More...
Join our online Google+ community for Bloggers, Content Writers and Webmasters




Forums » .NET » ASP.NET »

Auto suggestion ajax in mobile webforms in vs 2005


Posted Date: 30 Jun 2012      Posted By:: siva     Member Level: Bronze    Member Rank: 3581     Points: 4   Responses: 1



Hi,

Am developing mobile application in visual studio 2005. I want to implement auto suggestion textbox in mobile application.

Am using ajax control in normal web application. But not in mobile applcaiton.

I don't know mobile application whether support ajax or not .

Please advise me freinds ....How to achieve auto suggestion feature in mobile application using ajax or any other (jquery,dojo script) methods.

Thank you

....siva....




Responses

#678222    Author: Rajasekar.K      Member Level: Silver      Member Rank: 417     Date: 30/Jun/2012   Rating: 2 out of 52 out of 5     Points: 4

Hi Siva,




use this code,


i have given code below, download it.




ASPX Code :



<%@ Page Language="VB" AutoEventWireup="false" CodeFile="SuggestionDropdown.aspx.vb" Inherits="SuggestionDropdown" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script type="text/javascript" src="jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="jquery.searchabledropdown.js"></script>
<html xmlns="http://www.w3.org/1999/xhtml">

<head runat="server">
<title></title>
<script type="text/javascript">
$(document).ready(function () {
$("#myselect").searchable();
});


// demo functions
$(document).ready(function () {
$("#value").html($("#myselect :selected").text() + " (VALUE: " + $("#myselect").val() + ")");
$("select").change(function () {
$("#value").html(this.options[this.selectedIndex].text + " (VALUE: " + this.value + ")");
});
});

function modifySelect() {
$("select").get(0).selectedIndex = 5;
}

function appendSelectOption(str) {
$("select").append("<option value=\"" + str + "\">" + str + "</option>");
}

function applyOptions() {
$("select").searchable({
maxListSize: $("#maxListSize").val(),
maxMultiMatch: $("#maxMultiMatch").val(),
latency: $("#latency").val(),
exactMatch: $("#exactMatch").get(0).checked,
wildcards: $("#wildcards").get(0).checked,
ignoreCase: $("#ignoreCase").get(0).checked
});

alert(
"OPTIONS\n---------------------------\n" +
"maxListSize: " + $("#maxListSize").val() + "\n" +
"maxMultiMatch: " + $("#maxMultiMatch").val() + "\n" +
"exactMatch: " + $("#exactMatch").get(0).checked + "\n" +
"wildcards: " + $("#wildcards").get(0).checked + "\n" +
"ignoreCase: " + $("#ignoreCase").get(0).checked + "\n" +
"latency: " + $("#latency").val()
);
}
</script>
<style type="text/css">
body {
font-family: sans-serif;
font-size: 13px;
}

h1 {
font-size: 20px;
}

h2 {
font-size: 16px;
margin: 50px 0 8px 0;
}

h3 {
font-size: 14px;
}

#myselect {
border: 2px solid red;
padding: 4px;
font-weight: bold;
text-transform: uppercase;
background-color: #CCC;
}
</style>
</head>

<body>

<form id="form1" runat="server">
<div>
<asp:DropDownList ID="myselect" runat="server" AutoPostBack="true" >
<asp:ListItem Text ="Aachener Stra" Value="1"></asp:ListItem>
<asp:ListItem Text ="Abbestra" Value="2"></asp:ListItem>
<asp:ListItem Text ="Barbarossastra" Value="3"></asp:ListItem>
<asp:ListItem Text ="Berkaer Stra" Value="4"></asp:ListItem>
<asp:ListItem Text ="Christophstra" Value="5"></asp:ListItem>
<asp:ListItem Text ="Crivitzer Stra" Value="6"></asp:ListItem>
<asp:ListItem Text ="Dahrendorfzeile" Value="7"></asp:ListItem>
<asp:ListItem Text ="English" Value="8"></asp:ListItem>
<asp:ListItem Text ="Aache" Value="9"></asp:ListItem>
<asp:ListItem Text ="Danckelmannstra" Value="10"></asp:ListItem>
<asp:ListItem Text ="Stra" Value="11"></asp:ListItem>

</asp:DropDownList>
</div>
</form>
</body>
</html>


Regards
Rajasekar.K



jQueryDropdownSuggestions1.rar
 
Post Reply

 This thread is locked for new responses. Please post your comments and questions as a separate thread.
If required, refer to the URL of this page in your new post.



Next : I want reduce my page like dialog box.and i have to disable the maximize button
Previous : Reports using Reportviewer control
Return to Discussion Forum
Post New Message
Category:

Related Messages



Follow us on Twitter: https://twitter.com/dotnetspider

Active Members
TodayLast 7 Daysmore...

Awards & Gifts
Email subscription
  • .NET Jobs
  • .NET Articles
  • .NET Forums
  • Articles Rss Feeds
    Forum Rss Feeds


    About Us    Contact Us    Copyright    Privacy Policy    Terms Of Use    Revenue Sharing sites   Advertise   Talk to Tony John
    Copyright © SpiderWorks Technologies Pvt Ltd., Kochi, India
    2005 - 2012 All Rights Reserved.
    .NET and other trademarks mentioned in this site belong to Microsoft and other respective trademark owners.
    Articles, tutorials and all other content offered here is for educational purpose only.
    We are not associated with Microsoft or its partners.