.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

how to make VS Intellisense show complex object's properties for result of Ajax call?

Posted By:      Posted Date: October 21, 2010    Points: 0   Category :ASP.Net


I've create a WCF webservice and created a proxy to the service using ScriptManager.

I can see the created a proxy class, and intellisense pops up the methods of the webservice (great!!). But, I can't see the properties of the method params, return types.

The webservice method:

searchResponse DBSearch.Search(searchRequest)

have comlex types as a parameter (searchRequest) and a return type (searchResponse).

Intellisense does recognize these types, but I can not see the properties (javacript does);


var _searchRequest = new DBSearch.SearchRequest; (intellisense knows type SearchRequest)

_searchRequest.query = "liver lacerations"; (intellisense doesn't know it's property 'query')

_searchRequest.searchOptions = "modality=mri";

Obviously, with javascript, var _searchRequest is not typed, but is there a way to hint intellisense into the properties of the class?



View Complete Post

More Related Resource Links

Get xhr object in vb.net when error occured in ajax call using JQuery.

Hi Dude,   I have a big problem in Jquery ajax call. I am calling the web service whenever click the update button. I have a separate web service class, in which consist of few methods. When I calling the web service method, I have made the error handling and log the error information in db after that I have to override the "ex" that means error object to XMLHttpRequest. Is it possible to assign the sqlexception to ajax object (xhr) in vb.net? Please help me its much more useful for me.   Thank in advance.

Ajax.BeginForm does not update/show the result in partial view


I have a view.On which i have two partial viewMy m ain is like this ->.(Note i am using Ajax.BeginForm here.)

<body >
<% using (Ajax.BeginForm("SearchRequests", new AjaxOptions { UpdateTargetId = "SearchRequestDIV" }))
   { %>
 <%-- <%using  (Html.BeginForm("SearchRequests", "PlanRequest", FormMethod.Post, new { enctype = "multipart/form-data" })){ %>--%>
    <div >
       <table class="tableborder" border="0" cellpadding="0" cellspacing="0">
            <%if (Model.MessageText !="" && Model.MessageText !="undefined") { %>
                <td >
                    <font color="red"><%=Html.Encode(Model.MessageText)%></font>
                   <% Html.RenderPartial("SearchRequestCriteria", Model); %>         
            <% if (Model.SearchResults.Count > 0)
               { %>
                 <div id="SearchRequestDIV">

Using jQuery to directly call ASP.NET AJAX page methods

Here I am looking to explain how to call page methods using jQuery. Using jQuery to directly call ASP.NET AJAX page methods

.NET Exceptions: Make the Transition from Traditional Visual Basic Error Handling to the Object-Orie


If you're used to Visual Basic 6.0 and you're making the transition to Microsoft .NET, you will find that error handling is quite different from what you've used for years. Visual Basic .NET uses a more object-oriented solution to signaling and responding to unexpected problems while your program is running. This approach, called structured exception handling, has a number of advantages over the On Error statements provided in previous versions of Visual Basic. For instance, exceptions give you lots more information about exactly what went wrong in your app. To help you take advantage of this modern error handling paradigm, this article will show you how to raise and respond to exceptions, as well as how to create your own custom exception classes.

Jesse Liberty

MSDN Magazine November 2002

Search result show unauthorized Files Share


Hi All,

I configured a FileShare content source, the crawl about this source works very fine, but when a end user perform a search on it ,he can show into the search result files that are no access on the file server, but when he click on it of  course he received an access is denied.

How I can filter the search result about FileShare content source to see only files with authorized access?

Thank you for your help,





Jquery Ajax Call to Mvc Action tips.


I try to do a ajax call via the jquery api.

The scritp :

$("#sortColumn").click(function(e) {
                var columnName = $(this).attr('name');
                var sidx = columnName;
                var sord = '<%= (string)ViewData["sord"] == "asc" ? "desc" : "asc"%>';
                var page = '<%= ViewData["page"] %>';
                var rows = "5";
                type: "POST",
                url: "/Mailings/GetData2",
                data: {'sidx': sidx ,'sord': sord ,'page': page ,'rows':  rows },
                contentType: "application/json; charset=utf-8",
                dataType: "json",
                success: function(response) {
                var jsonObject = (typeof response.d) == 'string' ? eval('(' + response.d + ')') : response.d;
                error: function(xmlHttpRequest, textStatus, errorThrown) {
                    document.getElementById('infoContentHeader').innerHTML = xmlHttpRequest.responseText;


And the

$.ajax post from asp.net page and __viewstate causing call to fail



Now I know that I won't be sending viewstate and eventvalidation in my ajax calls and that I will only want to send the actual form fields for efficiency purposes but I will need to know the answer to this question, to inform the more junior members of the team and my manager, so if anyone has any answers they are most welcome.

I have a simple form as follows

<form id="form1" runat="server"> 
<p>Field1: <

make json call to send an email


the aspx:

<div class="contactSubmit">
                <asp:ImageButton ID="ibSubmit" runat="server" ValidationGroup="vgContact" /></div>


the jquery :

$(document).ready(function () {
            // Add the page method call as an onclick handler for the div.
            $(".contactSubmit").click(function () {
                    type: "POST",
                    url: "Home.aspx/GetDate",
                    data: "{}",
                    contentType: "application/json; charset=utf-8",
                    dataType: "json",
                    success: function (msg) {
                        // Replace the div's content with the page method's return.

The problem is that I need to use the text in a text box in my webmethod, and I can't because it's static, this results in a compilation error:

    public static string SendContactForm()


what is role of object properties when using client side validations ?


I have been using properties and have idea that using properties with private fields we can implement validations and buisness rules in them.

But I am just thinking asp.net client side validation controls provide good strength and they provide good user experience as well. They can be used for any type of validation (using regular expression) on client side and their re-use is possible on server side. When validation controls are a must and they are powerful; is making properties not just wastage of time ?

Is there still some use of properties ? Please guide me.


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>  

WCF - First call to Callback instance from Server takes considerable time to make it to the client.

Hello. There's a performance problem we are facing that we are unable to fix using DuplexChannels. The first call made by the client to the server reaches the server instantly. The first call made by the server to the first client using a Callback proxy will take several seconds to reach the client. All subsequent calls to the client (as well as other clients) will reach and execute instantly. The client connects to the Server using a proxy to IServiceProvision, supplies an instance to an implementation of IClientCallback and calls IServiceProvision.Start(). The server instantly processes the call and makes an asynchronous call to IClientCallback.DoWork(), which takes several seconds to enter the client's DoWork() implementation. The remainder of the execution then runs smoothly. Also, the server will experience such a slowdown only for the very first call of the first client that connects to it. Is it normal for the Callback interface to take so much time to warmup, only on the first call to the first client? Below is the full source code. Thanks for any information you may provide. Cheers Mike Shared Class Library using System.ServiceModel; namespace Test { [ServiceContract(Namespace = "http://test/IService", CallbackContract = typeof(IClientCallback))] public interface IServiceProvision { [OperationContract] void Start(); [OperationContract] void

Make a webpart properties customizable only by an Administrator

I am developing a sharepoint 2010 visual webpart that will show some sort of ajax content. I have a property on the webpart for the refresh rate, but I want this property to be set only by an Administrator (or any specific group). What is the best way to achieve this? Thank you.

How to control the text and other properties in ResourceDictionary object that i wrote ?

I wrote some ResourceDictionary. This ResourceDictionary is actuly a button that i use - I created this button by using Rectangle and TextBlock ==> that mean that the my xaml look like the code below. The problem is that i cant change the font size and the text of the TextBlock. I can change is just from the xaml of the template. And ... How can i define some variable that will control on the rectAngle redius in runtime ? Someone can help ?? ? Thanks. ...<ResourceDictionary> <Style x:Key="MyBtn" TargetType="{x:Type Button}"> <Rectangle ... <TextBlock.... </ResourceDictionary> ...

AJAX call is not working on F5 load balancer web farm setup

I have the following web farm setup in production server.Browser --> HTTPS --> Load Balancer --> HTTP --> webserver nodeF5 Load balancer handles off box SSL termination. It implies that SSL resides on F5 load balancer. Problem Statement: Ajax calls do not go through unless "Access data sources across domains" option is enabled in IE security settings. I have the similar setup in staging server except F5 Load balancer. The ASP.Net application makes perfect AJAX calls on both HTTP and HTTPS.However, the staging server web farm use windows NLB and SSL resides on individual web server nodes

Can i override the sqlexcption object into ajax OnError function?

Hi Dude, I am little stranger to web service. i do not know how can i implement your given functionality? i will show my webservice and web method. Please let me know how can i override the sqlexption error object to ajax error object? Please help me as soon as possible.. <WebMethod()> _       Public Function AddDetailPageData(ByVal strTableQuery As String, ByVal strFieldName As String, ByVal strFieldData As String, ByVal strWherCond As String)        Dim intRecCount As Integer = 0        Try            Dim param() As SqlParameter = New SqlParameter() _                                {New SqlParameter("@strtableQuery", SqlDbType.NVarChar, 50), _                                New SqlParameter("@strFieldList", SqlDbType.NVarChar, 4000), _                           

Make Ajax CalendarExtender always visible on a modalpopup

Hi There,Using a modalpopupextender a panel having controls is poped-up as a modalpopup. The problem I am facing is how to make the Ajax Calendar always  visible on the modalpopup.Functionality of controls on modal popup:1. A calendar (use of Calendarextendar preferred) and a ListBox placed side by side. 2. calendar's behavior need to be exactly the same as that acheived using a Ajax Calendarextendar3. The Calendar is always visible. 4. The days selected by user are appended to the ListBox (with no repeatition)How to meet the above conditions? Any help will be gratefully acknowledged.

Using AJAX update panel to show image but still blinking

May anyone help me on this issue please?I'm developing a web site that can grab image captured from cameras and show in the web page, i'm currently using Ajax's Update panel to update the image every second, my web files and Images is located in IIS virtual directory, browsing using IE7.My code is as following :<asp:UpdatePanel ID="uPVideoPane1" runat="server">                                 <triggers>                                     <asp:AsyncPostBackTrigger ControlID="Timer" EventName="Tick" />                                 </triggers>                                 <contenttemplate>                                     <asp:LinkButton ID="linkCamera1" runat="server">                                         <asp:Image ID
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