.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

Ajax Slideshow, webservice and database

Posted By:      Posted Date: September 17, 2010    Points: 0   Category :ASP.Net
Hey I would like to know if someone can please help meI would like to use the ajax slideshow extender and  getting the Image Url stored in a databaseso far my webserivice look like this..but I think im making a mistake somewhere..its not working<WebMethod()> _    Public Function GetSlides() As AjaxControlToolkit.Slide()        Dim Connection As SqlConnection        Dim DBCommand As SqlCommand        Dim newdt As New DataTable()        Dim SQLString As String        Dim TheCompanyID As String = "1242"        Dim myConn As String = (ConfigurationManager.ConnectionStrings("MyConnectionString").ConnectionString)        Connection = New SqlConnection(myConn)        Connection.Open()        SQLString = "select CImageUrl, CImageDescription, CImageTitle  from Company_ImageGallery where CompanyID = @CompanyID"        DBCommand = New SqlCommand(SQLString, Connection)        DBCommand.Parameters.Add("@CompanyID", SqlDbType.Int).Value = TheCo

View Complete Post

More Related Resource Links

question on ajax toolkit slideshow extender's webservice


I need to set up the slide show based on a querystring parameter.  I thought I had this figured out, but I clearly don't understand something about how the webservice works. 

I have this in the .aspx page:

<asp:Button ID="btnPrev" runat="server" Text="Prev" />
    <asp:Button ID="btnPlay" runat="server" Text="Play" />
    <asp:Button ID="btnNext" runat="server" Text="Next" />
    <asp:Label ID="lblDesc" runat="server" />
    <cc1:SlideShowExtender ID="SlideShowExtender1" runat="server" BehaviorID="SSBehaviorID"

Writing Data to database with jQuery Forms, ASMX Webservice, & JSON - help!



Can someone point me in the right direction on how to submit data from a jQuery form to a ASMX webservice? I have gotten everything on the form ready to be submitted to the database and now I am stuck on how to send it over using $.ajax(). Everything I have read tells me how to get data from a webservice and display it with jQuery, but not the other direction nor how to access the json data within the within the webservice service(similar to a Request.Form approach with ASP.NET forms).

In other words: 

1. What do I need to do to my webservice to make sure it can receive data from the jQuery form. 

2. What do I need to do in jQuery to receive an acknowledgement the save on the server side was successful. 

I can explain more if need be, but if there is a comprehensive tutorial on not only reading, but also WRITING data with jQuery, JSON, etc. I would love to get pointed in that direction. 

ajax call to webservice

I am new to jquery and want to make a simple jquery ajax call to webservice. My webservice is running fine but I am unable to get the data through ajax and jquery. My code is <%@ Page Language="C#" AutoEventWireup="true" CodeFile="WS.aspx.cs" Inherits="WS" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"><title></title> <script src="jquery-1.4.2.min.js" type="text/javascript"></script> <script  type="text/javascript"> $(document).ready(function() { $("#btGetDate").click(function() { //$("#dvDate").html("I am here"); $.ajax({ type: "POST", url: "WebService.asmx/GetDateTime", contentType: "application/json; charset=utf-8", dataType: "json", success: function(msg) { $("#dvDate").html(msg); } }); }); }); </script> </head> <body> <form id="form1" runat="server"> <div> <div id="dvDate"></div><input id="btGetDate" type="button" value="Get Date" /> </div> </form> </body>  

how to implement user rating using ajax rating control from database?

Hi,I'm beginner to ajax. I've a database table having fields rating and item id.I've to display star rating using  ajax rating control for the corresponding item id.How can i do this?  

AJAX Slideshow extender on Master Page

 I am pretty much a novice at AJAX.  I really appreciate the How To videos for ASP.net and AJAX.<> My problem is this.  I would like to have a very simple slideshow running on my Master Page.  I can get a slideshow on my AJAX enabled .aspx pages without any problem, using the examples in the video.<>When I create a Master Page/Content pages site with an AJAX ScriptManager and SlideShowExtender on my Master Page and move the functioning slideshow code onto the Master, it does not seem to run.<>I would appreciate any input.  Thanks.  Master Page Code:<%@ Master Language="C#" AutoEventWireup="true" CodeFile="MasterPageTwo.master.cs" Inherits="MasterPageTwo" %> <%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="cc1" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server">     <title>Untitled Page</title>     <asp:ContentPlaceHolder id="head" runat="server">     </asp:ContentPlaceHolder> </head> <body>     <fo

Ajax enabled website and MSAcess Database

Hi i have problem while connecting to my MSAccess  Database in App_Data Folder in Ajax enabled website. How to bind Gridview with MsAcess Databse in Ajax enabled website???? Can u please help me , i m new to Ajax and Asp.net.   Thanks in Advance    

Unable to get to the webservice using ajax POST jQuery



I need to pass a customer id to get some data back for a customer from a webservice. I can't figure out how to get to the webservice, I have a breakpoint set in the webmethod but it's not being hit and the alert box is not popping up either.  For a test I am just trying to show some value from the returned data in an alert box.  Note I am just hard coding the customer id of 1001. The webmethod takes a parameter of string customerid.

//Webmethod code:

        public customer fetchcustomer(string customerid)
            customerDL custDL = new customerDL();
            return custDL.getData(customerid);



//jQuery code:
   $(document).ready(function() {

            type: "POST",
            contentType: "application/json; charset=utf-8",

question on passing variable to Ajax Extender Toolkit Slideshow


I need to create a slideshow that displays all the images in a folder that have filenames that match a specific criteria.  The criteria is based on a querystring.  Is there a way to get a the querystring into the slideshow's webservice?  If not, does anyone have any suggestions?  I've been looking and looking but everything I've seen has one or more things that I need that it can't do.

Help with opening PDF from SQL05 Database from AJAX cascading DropDown



I am new to ASP.NET and AJAX. I have recently viewed the video tutorials on the Cascading Dropdowns, and applied that to my website. I am populating the dropdowns from 3 tables, and am wondering how i would be able to open pdf file from the sql database and display it in the browser. Can anyone provide me any suggestions? Thanks to all

AJAX Auto Complete Extender with Database


Hi Guys

I have decided to use the Ajax Auto complete extender with a database, i found some cool articles on google to do this, but i cannot get it to work, I am trying a simple example where i have 1 textbox and i am trying to obtain products from the products table in the northwind database, heres my code (its not working)

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

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
    <cc1:AutoCompleteExtender ID="AutoCompleteExtender1" runat="server" MinimumPrefixLength=&quo

Ajax cascading dropdown and passing querystring to webservice



i am using Cascading dropdown, with following scenario.

a page "myPage.aspx" is loaded with a Querystring. [http://localhost/myVD/myPage.aspx?jobID=003]

this page contains 2 cascading dropdowns say state & City .  the idea is to fill the provinces Combo based on INCOMING querystring value "jobid".

also i have a webservice named "Mywebservice.asmx" which has webmethods to retrieve city based on jobID.

but since these webmethods are Contained in asmx . the querystring of the caller page is not visible to the webmetod of the service.

here's  snippet for reference/

public CascadingDropDownNameValue[] GetContainerByJobID(string knownCategoryValues, string category
            //StringDictionary categoryValues = CascadingDropDown.ParseKnownCategoryValuesString(knownCategoryValues);
            //string jobId  = categoryValues["JobID"];

           string  jobId

Slideshow using access or Sql database to obtain image names.


I've watched the Slideshow videos and created a number of examples that run fine.  The code I've attached at the bottom is the smallest one, but instead of hard coding the image locations, I would like to select the slides from either of the following statements, which return the top 5 images selected randomly from our floorplans database. 

  • <asp:AccessDataSource id="AccessDataSource1" runat="server" DataFile="../fpdb/J3_2005.mdb" SelectCommand="SELECT TOP 5 [Elev_Pimage] FROM [PLANS_Active] ORDER BY RND(INT(NOW*[SF_Total])-NOW*[SF_Total])" />


  • <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:J3_2005Slideshow %>" ProviderName="<%$ ConnectionStrings:J3_2005Slideshow.ProviderName %>" SelectCommand="SELECT TOP 5 [Elev_Pimage] FROM [PLANS_Active] ORDER BY RND(INT(NOW*[SF_Total])-NOW*[SF_Total])" />


Ajax autocompletextender Usercontrol + Webservice


I'm trying to create a Autocomplete search in Ajax using ajax toolkit 4.

I run the control in my Umbraco 4.5 site.

The control displays but does not work. 

As I see it there could be two possible problems:

  • Ajax toolkit 4 does not work with umbraco 4.5(Im searching for this answer over at the umbraco forum)
  • The webservice method is not found


Judging by the code below....are there any obvious problems that you could spot for me?


ascx.cs file

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.

AJAX call to webservice is not working for strange reasons.


I have a webservice "DataService.asmx" which I am using for AJAX calls for insert, update, delete and some other tasks. All the pages are calling webservice smoothly but this new page I added and calling my webservice using the same ajax method not working. Strange thing is that neither its going on SUCCESS nor FAILURE...and put a breakpoint on my webservice but its not going into the webservice...plz help as its been 6 hours now figuring what the problem is..here is the code.

<script type="text/javascript">

    function UpdateBillRow(billingMonthObj, currentBillUnitsObj, bdueDateObj, AdvIncTaxObj, wHoldingTaxObj, gstObj, amtAfterDDObj, gRowID)
        var bmonth = document.getElementById(billingMonthObj).value;
        var currentunits = document.getElementById(currentBillUnitsObj).value;
        var duedate = document.getElementById(bdueDateObj).value;
        var advIncTax = document.getElementById(AdvIncTaxObj).value;
        var wTax = document.getElementById(wHoldingTaxObj).value;
        var gst = document.getElementById(gstObj).value;
        var amtafterdd = document.getElementById(amtAfterDDObj).value;
        var gridRowID = document.getElementById(gRowID);

        alert("button called and now going to call ajax...");

        //Call Ajax to check userid availability 

Autocomplete textbox with ajax and sql database



    <form id="form1" runat="server">
        <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
                <asp:ServiceReference Path="~/WebService.asmx"/>
        <asp:TextBox ID="TextBox1" runat="server" autocomplete="off"></asp:TextBox>              

        <asp:AutoCompleteExtender ID="AutoCompleteExtender1" runat="server" 
            ShowOnlyCurrentWordInCompletionListItem="true" >


i am using the same thing and till my webservice is concern, that is bringing up the value from table but when i am typing on the textbox so it not showiing suggestion like a google... i debug my web service that is fine working...

can anyone tell m where i am doing wrong???? plz he

ajax autocomplete with webserivce from database values



i want to make the autocomplete textbox with ajax and i have used web service for that bt when i am writing something in my textbox so nothing is happening... plz tell me where i am wrong. here is my code..

Can anyone plz send me the source code of .aspx page and webservice code demo...

plz help me..


Microsoft AJAX CDN

Content delivery networks (CDNs) are composed of "edge cache" servers that are strategically placed around the world at key Internet network points. These "edge cache" servers can be used to cache and deliver all types of content - including images, videos, CSS and JavaScript files.

Using a CDN can significantly improve a website's end-user performance, since it enables browsers to more quickly retrieve and download content. For example, instead of having a browser request for an image traverse all the way across the Internet to your web server to download, a CDN can instead serve the request directly from a nearby "edge cache" server that might only be a single network hop away from your customer (making it return much faster - which makes your pages load quicker).
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend