AJAX :: JS Methods Are Exposed Via A Control?

Jun 29, 2010

I found a write-up somewhere about the multi-handle slider control and in the post there were the following javascript lines:

slider.add_value(value);
slider.add_drag(value);

Slider, in this case, is my slider control... but how did the person know these two methods exists? Is there an API guide somewhere for the Ajax Control Toolkit?

slider.add_valueChanged(onValueChanged);

View 3 Replies


Similar Messages:

AJAX :: Pages Methods Not Being Exposed?

Feb 28, 2011

I am trying to use some page methods on an aspx page. I've done this several times before in other asp.net applications and never had issues until now. I believe that maybe the issue has something to do with the methods be exposed to POST but I'm not entirely sure. Everything on the page loads correctly then once it attempts to make an ajax call rather than hitting the "test" function, the page tries to reload and the page_load method is called again. I chacked the URL string on both cases when page_load is called and both are correct. I am suspicous that there is some need to do with the web.config but I'm not sure what. The application is close to 10 years old and has been grandfathered up all the way to ASP.net 3.5. On another note, I can hit asmx functions perfectly fine its only page methods that seem not to work.

Imports System.Web.Script.Services
Imports System.Web.Services
Partial Public Class CustomDataFilter[code].....

View 1 Replies

AJAX :: Display List Of Operations Exposed From WCF Service?

May 25, 2010

Is there a way I can see the list of operations that are exposed by a WCF service same as we can with a asmx service?

View 1 Replies

Business Logic Not Exposed On Formview

Oct 16, 2010

I have to maintain an ASP.net application in VB.Net. There is a page with a FormView bound to a ObjectDataSource. I have to add some business logic on the ItemUpdating event of this FormView. Unfortunately, some the data that I need to add this business logic is not exposed on the FormView user-interface itself, so I can not use FindControl to get the values (I could add the controls, bind them to the fields I need and set their visible property to true, but that's ugly).

So, what I would need to do is to get access to the Data Row corresponding to the currently selected item in the FormView from the code behind as it has the data I need to add my business logic code. Unfortunately, I don't manage to get access to the row.

View 2 Replies

Controlling Which WebMethods Get Exposed Externally In A WebService?

Jan 11, 2010

I couldn't think of a decent title, so let me first apologize for that. I have a WebService (call it A) written for my app so I can take advantage of ASP.NET 3.5 AJAX features. I use the generated JavaScript proxy to make AJAX calls.As a side effect, WebService A is exposed for anyone to add as a reference to another project, which is great, except I don't want certain WebMethods to be available to external applications (in the same domain, BTW).So I've got two questions:Is there a way to control the exposure of WebMethods in WebService A?

If there isn't, I'm thinking I'll just add a separate WebService (B) that exposes the WebMethods I need from WebService A. But then,How can I prevent other applications from referencing WebService A while still allowing the application it originates in to access it?If that's not possible, I'm not really worried about it. The apps are all intranet-only, I just don't want the WebServices to be abused.Also, there is a similar question here already without any good anwers. The asker describes almost the same situation I'm in: [URL]

View 4 Replies

WCF / ASMX :: Consuming Web Service Which Is Not Exposed Directly?

Jun 14, 2010

I have created a webservice which is publicly exposed. This publicly created webservice can be consumed in the application But my requirement is I have to create a webservice to expose the schema and cannot be consumed directly.How to consume the web service which is not exposed directly.

View 1 Replies

C# - How To Access User Control's Fields And Methods Without Registering The Control

Jul 21, 2010

I have a ASP.Net project that is setup in such a way that it can be dropped into any site and "just work." All the paths are relative to the current file, not relative to the "~". The paths are determined by ThePath = this.TemplateSourceDirectory;

This is working for everything expect registering a custom control that is created and added to one of the pages. I can add the control just fine with the Page.LoadControl but I cant cast it as the correct type to access anything.

How can I add a reference to the class from within the code itself?

View 2 Replies

Microsoft.Web.Mvc.Internal.ExpressionHelper.GetRouteValuesFromExpression(expr) Exposed Now?

Jun 15, 2010

I want to use the method:

Microsoft.Web.Mvc.Internal.ExpressionHelper.GetRouteValuesFromExpression(expr)

but I don't want to use Microsoft.Web.Mvc, is this call supported in asp.net mvc now?

View 1 Replies

AJAX :: Datatypes Supported By Net Ajax Page Methods?

Feb 22, 2010

I am using the Page Methods of Asp.Net Ajax to call the server method by enabling EnabledPageMethods of ScriptManager to "True". Can we return the DataSet using the Page Methods written on server side?

And also I want to know what are the default datatypes that are supported by the Page Methods to return to client?

View 3 Replies

Using Extension Methods In Static Methods On Extended Classes?

Aug 16, 2010

I have an extension method as follows:

public static class PageExtensions
{
public static int GetUserId(this Page targetPage)
{
var user = Membership.GetUser(targetPage.User.Identity.Name);
return (int)user.ProviderUserKey;
}
}

Now in a page I need to use this method in a static WebMethod, so I have added another 'extension method' to PageExtensions:

public static int GetUserId()
{
return (int)Membership.GetUser(HttpContext.Current.User.Identity.Name).ProviderUserKey;
}

and I call it as follows in my WebMethod: PageExtensions.GetUserId()

View 1 Replies

Web Forms :: How To Change This Methods In To Use Dictionary Or Extension Methods

Jul 23, 2010

public class CacheHelper { /// <summary> /// Removes object with the specified key. /// </summary> /// <param name="key">The key.</param> [code]....

I have this methods for caching..I need to change this methods to use in aDictionary<string,object>

How do I need to change this code Because I am new to asp.net I am still learning..

View 12 Replies

Data Control Methods For Just One Record

Sep 20, 2010

I am making updatable pages for my website. I am new to asp.net so I want to find the best method to pull one record from the database. The record will consist of page name and page text. I have test information set up in the database which works of an ID and have constructed a database connection. But I want to use a database control which willl have minimum overhead for pulling out just one record. I won't require any features such as editing or pagination. I was thiking of using the data repeater.

View 3 Replies

C# - Executing Methods From User Control?

Jan 12, 2010

I have a user control written in C# in a Telerik ajaxified page. I wrote a context menu using RadContextMenu and everything works fine except one of my menu items is "refresh". How can I refresh my user control from javascript? Basically it needs to some how force the TelerikAjaxManager to refresh my control.

View 2 Replies

C# - Get Control Values And Modify Them In Page Methods?

Oct 5, 2010

I have couple of controls in the page. I need to modify these value in Page method. How can I do that?. When I modify those values in page method should reflect in page?

View 1 Replies

MVC : AJAX Methods - Code Is Not Working

Jul 22, 2010

Below is some code. The save() method was pre-existing. I added the saveRanking() method. When I walk through the code, it hits the method, but then it just bails out of it. No exception (that I can see). Do I need that function(data) part?
Code:
function save() {
$.post(
"/Applications/SaveStatus",
[code]....

View 1 Replies

AJAX :: Use Web Methods Without Using .asmx Files?

Feb 2, 2010

[WebMethod(EnableSession = true)]

View 5 Replies

AJAX :: Restrict To Call Web Methods?

Aug 25, 2010

Scenario is, I have a tab container inside which I placed 5 tabs and each tab having 4 Cascaded dropDown.Now for changing the tab page everytime refreshed and calling all 5 parent control dropwdown to fill.But can I prevent it in that manner so that for changing the tab only that parent webmethods will be called to populate.In page load itself it will call only the active tab parent Cascading dropdown web method.

View 8 Replies

AJAX :: Cascade Dropdowns With Web Methods?

May 10, 2010

I am showing state,city, zipcode in cascaded format. I designed cascade dropdown with asp dropdown list controls. I am loaing the citys & zipcode based on selection index changed.. here when I am selecting city the request is sending to server & its loading citys....

I don't want see post back operation on my page when I am selecting city & zipcode. So I am thinking to use Ajax cascade dropdown list to avoid sending the request for each selection.

If I use Ajax Cascade dropdownlist can i cascade the loading of citys & zipcode without using webservices?

If I use only webmethods for cascade dropdown it will work ?

View 4 Replies

C# - With What Methods Can I Dynamically Set An ASPX Control Property Before It Is Initialized

May 19, 2010

I need to configure a property of a custom control I wrote, specifically before the control calls OnInit. If I assign it as part of the ASPX file, it naturally works, but if I instead move the assignment to different parts of the code-behind, it will throw an error for having an empty and invalid value. The following is what it looks like when functional in the ASPX page.

<MyCustomControls:SingleCascadeLookupMulti FilterString="Seventh" FilterByStatus="true" ControlMode="New" FieldName="Speciality" EnableViewState="true" ID="sclmDocuments" runat="server" TemplateName="SingleCascadeLookupMulti" />

The property in question is FilterString, which is just a simple string. It should be noted as well that the FieldName property (inheritted from the control's base class "BaseFieldControl") would also throw an error if it is not initialized, but if I set FieldName in the code behind's OnInit method, it works correctly. FilterString is not so, it won't actually be assigned. So I know that some methods for certain properties will work for setting the property's value, but it won't always work. I tried placing it in OnPreInit as well, to no avail.

I am taking a dynamic assignment approach because the functionality of this page needs to be replicated for a number of different lists, and the FilterString and FieldName properties will differ in every case. Rather than write half a dozen mostly-identical aspx pages all with the same code behind but differing just in what those two properties are, I figured it would be wiser to use the page's query string and some derived parameters to set those properties dynamically. As such, what methods are available to accomplish this task?

View 1 Replies

Custom Server Controls :: How To Extend A Web Control's Methods?

Jan 19, 2011

How do I extend a web control's methods?

For example, I want to do this:

[Code]....

I know how to create the loop that checks for the value, I just don't know I to create an method extension to a control.

View 2 Replies

Web Forms :: Databinding Methods Can Only Be Used In The Context Of Databound Control

Sep 8, 2012

   SqlCommand _cmd1 = new SqlCommand("Viewstate2", _cn);
_cmd1.CommandType = CommandType.StoredProcedure;
_cmd1.Parameters.AddWithValue("@behcode", data);
string data1 = Request.QueryString["id"].ToString();
_cmd1.Parameters.AddWithValue("@id", data1);
_cn.Open();
SqlDataReader _dr1 = _cmd1.ExecuteReader();
while (_dr1.Read())
{
lblprice.Text = _dr1["price"].ToString();
Lbldate.Text = System.Convert.ToDateTime(miladitoshamsi(Eval("Date"))).ToString(" yyyy/MM/dd");

In the above code I get the following error

Databinding methods such as Eval(), XPath(), and Bind() can only be used in the context of a databound control. Description: An unhandled exception occurred during the execution of the current web request. review the stack trace for more information about the error and where it originated in the code. Exception Details: System.InvalidOperationException: Databinding methods such as Eval(), XPath(), and Bind() can only be used in the context of a databound control.Source Error: 

Line 97: lblprice1.Text = _dr1["price1"].ToString();
Line 98: lblprice.Text = _dr1["price"].ToString();
Line 99: Lbldate.Text = System.Convert.ToDateTime(miladitoshamsi(Eval("Date"))).ToString(" yyyy/MM/dd");

View 1 Replies

AJAX :: Page Methods Starting New Session?

Jun 29, 2010

I'm using ASP.NET page methods to check for the updates. I'm using inproc sessions and windows authentication in IIS 6. When page is loaded, a session is started. But sometimes when the page method is called it starts a new session(created with current request return true also). Why that might happen ?

View 2 Replies

AJAX :: Page Methods Querystrings Are Null?

Oct 20, 2010

I'm having problems with accessing querystring params in my page method. Everywhere I read it says you can access querystrings just fine, but when I try it just returns null, what's the problem?

same problem I found - [URL]

View 14 Replies

AJAX :: Can Not Call Two Different Pagemethods With Two Service Methods

Oct 1, 2010

I am using an AJAX dropdownlist control with two dropdownlist. Instead of using a webservice to populate the data, I used the pagemethod to populate. My problem is the second droplist won't populate. I get a server error, 500 in the droplist. The first droplist populates fine.

BUT here's the real kicker. If I reverse the order of the public static function such that GetHelloList2 comes BEFORE GetHelloList1 in the code, then the GetHelloList2 works ...... it just seems like it is only firing one pagemethod event and allowign only one.

[URL]

View 5 Replies

Code Behind Methods Vs. Jquery AJAX Calls?

May 3, 2010

Old school coders are used to having every server control create events in the .cs files.. for example.. Getting the Initial load of data, Saving Data, Deleting data... and then binding datasources to the server control..

New school coders want to do it in Jquery + AJAX calls to .svc files... That gives automatic no post backs so that is a advantage... and I think its a different way of thinking.. All of a sudden the UI related events are all being done in Jquery..

What is the most modern and efficient way to go ? How can I convince the old school coders to let us you this new paradigm ? (assuming it is the better way)

View 3 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved