I have a few custom composite controls that set their cssclass only when calling their ApplyStyleSheetSkin method.I worked around this by creating a function which recursively walks through all controls on a page and calls that method, but I was wondering if there isn't a way to do this automatically? (i.e. how do I tell the aspx page to call the ApplyStyleSheetSkin method inside the controls?
My web services have base web service method called IsGood()I want to make sure every methods in my web service call IsGood() in base web service automatically without add code in each web service method, can I do that?
[System.Web.Services.WebMethod] public static string GetStateData(string state) { //this is where i want to call a javascript method "GetItems" }
I have a javascript method that retrieves some values for me and I want to get use one of those values in my web method
function GetItems() { var variable1= $("#<%=Item1.ClientID %> input:checked"); var variable2= $("#<%=Item2.ClientID %>").val(); return [variable1.text(), variable2.val(), variable2];}
I've searched for ways to call the javascript method from the web method but every time my search results in how to call a web method from javascript.
I did find this but it was done from the code-behind of a silverlight project and when I tried adding the correct reference to my code-behind it wasn't there
var result = HtmlPage.Window.Invoke("GetItems"); Is there a reference I'm missing?
I am using JQuery & JSON (POST) to call webmethod. However I can call only webmethod located at aspx file but not in asmx file Below are sample codes
CustomValidate.asmx Imports System.Web.Services Imports System.Web.Services.Protocols Imports System.ComponentModel Public Class CustomValidate Inherits System.Web.Services.WebService 'ACCESS VIA JSON <System.Web.Services.WebMethod()> _ Public Shared Function AJAX_Test(ByVal date1) As Boolean... Return True End Function End Class Javascript: JQuery JSON function isDates(source, arguments) { var isValidDate; $.ajax({ type: "POST", contentType: "application/json; charset=utf-8", url: "CustomValidate.asmx/AJAX_Test", data: '{date1: "' + arguments.Value + '"}', dataType: "json", async: false, success: function(result) { isValidDate = result; }, error: function(httpRequest, textStatus, errorThrown) { alert("status=" + textStatus + ",error=" + errorThrown); } }); arguments.IsValid = isValidDate; }
It always return javascript undefined error. But if I put the AJAX_Test webmethod in aspx page and replace the url: "CustomValidate.asmx/AJAX_Test" to "mypage.aspx/AJAX_Test". It works fine.
I am creating an Asp.net web site which will support dynamic data. When I am creating a dynamic web site from Scratch (from template in VS) all is working fine. But when I am trying to add dynamic entity (.edmx) file and running the application I am getting following error
"The method 'Skip' is only supported for sorted input in LINQ to Entities. The method 'OrderBy' must be called before the method 'Skip'. "
I have an ActiveX object which extends some functions. I have a web page that loads the ActiveX object and calls its methods in Javascript. The ActiveX object has two method; the problem is that Javascript can successfully call one of them but fails to call the other; citing Object doesn't support this property or method which is nonsense because I made a VB6.0 application that successfully calls this other method, so the two functions are indeed extended correctly and performing their job. And yes, the Internet Explorer security zones are all set and everything, as I wrote above the javascript code can call one method but refuses to call the other.
I have an asp.net mvc application that take a while to load on my production server. I would like to write a script to call my pages every 10 minutes to avoid the pages from being scrapped on the server, which would then cause the server to reload them.
I was thinking of using a SQL Server stored procedure to call my pages every 10 minutes to keep the pages alive.
I've read that I can do this using CLR, but I am not sure how. Does anyone have an example of how to call webpages in a SQL Stored Procedure using CLR?
In one of the methods I'm using in my MVC app, there's a param that accepts a list collection of strings. If I have a string parameter, I can give it a default value of an empty string, but I cannot seem to give the list collection a default value of a new, empty list collection. I get the error that's beginning to seriously grate on my nerves about requiring a compile-time constant. getting the generic list to work with a default empty set?
I have following class in webservices, I am not able to override the constructer of webservice. Asp.net always call first method not the one with parameter.
[Code]....
How can i call the second constructer in asp.net? Pls provide vb.net code.
I am just learning ASP.Net and i am more using C# as code behind than vb.I am trying to call a method of the code behind (file.aspx.cs) from the (file.aspx).I know how to do it the easy way:- create a button from ASP.Net and double click on it than the property "onclick" will be linked to the method.But i don't know how to do it from a query:
- By example, from an Access database,i use the syste, [using System.Data.OleDb;] and i made a query and display it into a standar object named "Table" which has rows (tablerow) and cells (tablecell) and the cells have one of their properties which is "Controls" where developers can add button (regular button, image button, link button, etc). With i display the buttons from the database, i can not call a method from code behind! I can't either use their properties "onclick" to call i method i created in the code behind.Is there a way to do it ?
I have a page called AddNews.aspx and in codebehind a web method called AddNews(Parameters).. AddNews.aspx page is inherited from a master page.. So i used contentplaceholder. I have a button..It's id is btnSave.
I have a web application I am working on that uses a master page. I am reading I create a LinkButton in the codebehind file for the page. When the link is clicked on the webpage, it does not even call the method defined for it. I have tried multiple ways of doing this and nothing seems to work for me. The page that has the link is also the page that will display the data for the related record. Can anyone provide me with a way to get the linkbutton to call the method?kButton is created and added to a dynamic table on the page
/* setup a link button to display the member name * and add the cell to the row */ LinkButton memberLink = new LinkButton(); [code]...
I am facing an issue in my application when a user directly clicked on browser close [X] button. Browser can be IE, Chrome, Mozilla, Firefox and many more.
What I want to do:
1. as soon as user hits [X] button of browser, need to set their status as logged off in database for which we have a method in Login.aspx file which is within the master page.
2. We do not have any Logoff feature in the application
I'm currently working on a web site which involves a data upload process. The file is currently uploaded to the server method is called (in app_code) where ultimately a DTS package is called (via a web method) to load the data into a database and perform some validation on it.The client has specified that they don't want to have to wait for the DTS package to execute (execution time is less than 5 minutes) so it appears that I need to call the method asynchronously. The user will probably logout or close the browser window while this task is running so I believe I'm unable to run this on an asp.net thread.
I have a list of methods I wish to call and a button accompaning each and a generic method to handle the buttons.Using the commandArgument how can I run the selected method.E.g. Click run method1 button. In handler for button click call the method as named in commandArgument
public void IntializeRow() { DataTable dt = new DataTable(); DataRow dr = null; dt.Columns.Add(new DataColumn("itemcode", typeof(string))); dt.Columns.Add(new DataColumn("itemname", typeof(string))); dt.Columns.Add(new DataColumn("quantity", typeof(string))); dt.Columns.Add(new DataColumn("mrng", typeof(string)));
[Code] ....
Some methods for initialize grid view row and set previous row record. There any possible to call this methods from another page? Or any possible to use the same grid view to use different page....