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?
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?
I'm trying to use hyperlink fields in my gridview to pass certain values into another page using querystrings. On the next page I've put 'labels' that should be populated with data from the gridview, however nothing happens. This is my gridview code:
And this is the code behind file on the landing page:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
Dim ProdID As String = Request.QueryString("ProductID") Dim ProdName As String = Request.QueryString("Prod_Name") Dim ProdPrice As String = Request.QueryString("Prod_Price") Dim ProdStock As String = Request.QueryString("Prod_Instock") Dim ProdDescrip As String = Request.QueryString("Prod_Descrip")
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 ?
I wish to create a website based on ajax functionality using Master and Content pages.I want to use page method or xmlhttprequest object to check some validations in registration form,which is a content page of my website. Is it possible to work so or is there any other method to do it.
The code I'v written using page method in normal aspx page working fine but it is not working in contnet page.
i have 2 dropdown list, menu and a gridview in my aspx page.
in the gridview a have add a linkbutton with select CommandeName.
i want to use the postbackurl in the linkbutton to open an other page with querystrings parameters.
this querystrings should contain: the selected item in Menu, the dropdownlist1 selected value, dropdownlist2 selectev value and the gridview selected value.
how do i add all the controls value to my postbackurl ?
I have three cascading dropdowns on my web page and they work fine. The issue I am facing is that there are other controls on the page which cause a postback and with each postback the cascading drop downs are being re-populated (service methods are called) which is becoming a performnace issue.
I'm using the MVC2 framework and one of my views has a bit of conditional logic that gets the Page.User.Identity object and does a comparison with other values to determine what to display.That all works fine on the initial page load, but when I make an AJAX call to get partial page updates (I'm doing this all manually with YUI3, not the .NET AJAX stuff) the Page.User object is always null.
I decided to use the CalendarExtender on a project and I converted it from VS 2005 to Web Developer 2010 Express. I initially added the AJAX toolkit for ASP.NET 4.0 and the calendar extender worked fine. However, I realised that the server didn't have ASP.NET 4.0 installed and I thought it would be simpler to add the toolkit for 3.5 instead and change the target framework to 3.5. I tried and then the CalendarExtender did't work at all. When you click the textbox nothing happens. There is the error on page - 'sys.extended.ui.textboxwrapper is null or not an object'
I tried switching the project back to 4.0 and using the other one and that no longer works for some reason. The same in 2008 Web Developer Express. I've clearly done something wrong along the way, but I can't work out what it is.
Here's the source for a page on a test Web Developer 2008 Express project.
Is it possible to call usercontrol methods/events using MSAJAX. I wanted to update my usercontrol by calling one of its events when a property from its parent page changes.
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()
I'm a novice ASP.Net/C# programmer, and had an experience only of a couple of projects during college and a couple of freelancing projects when I was recruited by a startup company to build their ASP.Net based website. I've just abut completed the website, and now since the company is not able to find a worthy enough SEO, I'm expected to do our site's SEO as well(which is a totally new experience for me). Did I mention that I'm the only Web Developer here?So, now as you'd expect a novice programmer having no concern for future SEO needs, I built up the site without giving due consideration to any of the SEO enhancement techniques.
The Problems:
ViewState - When is it required? Is it really required if I'm not creating any controls on the fly? I'm using DataControls though. And the website(the pages visible to the user not the CMS), is purely information based. Also, if I disable a control(ex: DataList)'s viewstate, will the viewstate of controls inside it also get disabled?(which is what I'd like actually)QueryStrings - Now comes the toughest part, I've used Query Strings to the extent that you can say that the website is QueryString driven, which unfortunately enough is not a good thing for SEO. To make matters worse, the QueryStrings for some pages are not uniform. For ex- In some cases the querystring may have variables A, B, and C, while in other cases it can have variables M, B, C and probably not all the three variables in some cases. Now, I know that I'd have to do url rewriting but these query strings have dynamic data fetched from the database tables of size more than 10,000 rows. So would I have to create functions for url rewriting and use regex to separate wheat from whaff?
to fetch data to popup control dynamically I used webservice [WebMethod]public string getIssueDetails(string contextKey){ } But before that I set ModalPopupExtender1.DynamicContextKey = "1_1_60"; in code behind.But problem is in webmethod "contextKey" is getting passed as null.
I am trying to implement URL Routing for a non MVC application. Here's my original [URL] to [URL] I have difficulty when the page has query strings in the URL. This is the route handler I have so far:
public class CustomRouteHandler : IRouteHandler { public IHttpHandler GetHttpHandler(RequestContext requestContext) { return BuildManager.CreateInstanceFromVirtualPath("ProcessStuff.aspx", typeof(Page)) as Page; } }
I have been looking at ways of encrypting querystrings and I have found a few good examples.. but, I just want some clarification on what is most often referred to as the EncryptionKey and the characters that are in that key....Is there basically an unlimited number of alphanumeric combinations that could be used in the following code as the encryption key, is there anything that someone should be CAREFUL about including in that key?
using System.Security.Cryptography; private static string EncryptionKey = "!#$a54?3"; /// other examples: "r0b1nr0y" ///in a try-catch: key = System.Text.Encoding.UTF8.GetBytes(EncryptionKey.Substring(0, 8)); DESCryptoServiceProvider des = new DESCryptoServiceProvider(); inputByteArray = Convert.FromBase64String(Input);
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]....
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].....
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?