asp.net

jQuery evangelists!

I'm absolutely digging what I've been able to do in jQuery. From my perspective there isn't a lot jQuery can't do. I'm working on a new project and my plan is to use jQuery heavily with JSON,Ajax and Webservices inside of a ASP.net project. Before I go spouting my opinion about how great jQuery is, I thought I might ask if there are...

ASP.NET Universal Login from Multiple Sites

Hey everyone! I have a question that doesn't need any specific answer, just a general direction of what to do. I work for a company that has many sites. Each site requires a login at some point. We have a single Accounts database that all of the sites hit. One of the requirements for the login system is that if we login on one site,...

WCF Webservice for sending and receiving larget byte []'s

I've read numerous posts about this and have received conflicting info - I'm trying to 'boil down' a number of questions others have asked in hopes a good clear answer can exist somewhere on the web :-) I am writing .NET application for my PC that connects to an IIS webserver running ASP.NET. The webserver has two methods similar to...

Create an array or List of all dates between two dates

I am generating multi-series graphs with the date along the X-Axis. The problem is that not all of the series in the graph have the same dates in the date range. Meaning that if I choose 1 Feb through 30 Apr that one series may have data that starts at 1 Feb but only goes through the end of March but another series may have data for th...

Does anyone know how to use excanvas with Mootools chart?

I'm using the mootools bubble chart here http://moochart.coneri.se/ and want to make sure it compiles in all browsers (including IE7 and IE8). The creator says that I can try using Excanvas, but does anyone know how to actually implement this? Thanks! ...

ASP.NET gridview dynamic changing cell background

I have a griview which is bounded to a sqldatasource and changed dynamically. How do I change the background cell color based on the value? e.g., 0-0.5 green, 0.5-1 red, sth like that. <asp:GridView ID="grid1" runat="server" AutoGenerateColumns="False" DataSourceID="SqlDataSource3"> ...

How to check browser's JavaScript is enabled or not.

My application depends on JavaScript, I want to check the client browser's JavaScript is enabled or not and raise an alert message if its turned off. ...

Global.asax Exception Handling and HTTP Error Codes

I have a fairly standard MVC2 app running on 4.0 and under IIS6. I took the wildcard filter approach to route all requests to the asp.net ISAPI filter. So far so good. I have now added some code to Application_Error in the global.asax to trap exceptions and email me the stack, etc. This also works fine. But, I am receiving all kinds of...

passing c# code from aspx.cs to xaml.cs

Does anyone know how to do this? Specifically I have two arrays and some floating point numbers in an aspx.cs file and want to use it for a web silverlight app (xaml.cs). Thanks for the help! ...

How to programmatically get session cookie name?

The default cookie name for the Session Id in ASP.NET is ASP.NET_SessionId. It's also possible to change this name to something else like <sessionState cookieName="FooBar" />. Is there a member to easily access this name like with FormsAuthentication.FormsCookieName? ...

How would I prevent the session from expiring while using AJAX?

Hello, I have a .Net 3.5 website which uses windows authentication and expires the session using a meta tag on the prerender of my base masterpage class. protected override void OnPreRender(EventArgs e) { base.OnPreRender(e); if (Response.ContentType == "text/html") this.Page.Header.Controls.Add(new LiteralControl( ...

How do I get an asp.net 3.5 textbox input into JavaScript?

Looking at many forums this seems to be the solution, however, it doesn't seem to work for me: function update() { alert("hello world"); var test = document.getElementById("<%=InCL.ClientID%>").value; alert(test); } and the asp/html is: <asp:TextBox ID="InCL" runat="server" Text="" value="" onchange="u...

Does an ASP.NET website use cookies by default?

It seems like there are a lot of ways but no default. For State management, does ASP.NET use cookies by default? If so, what are the alternatives to using cookies? If not, what does ASP.NET use by default to manage state? ...

NHibernate Session and Transaction management in HttpModule

I've seen many implementations on the web of people managing their NHibernate sessions and transactions in a HttpModule. The HttpModule: creates a session at the start of the request wraps the whole request in a transaction commits the transaction at the end of the request If people use this strategy how are they handling the foll...

Check if a form has a key?

In asp.net i need to check if a form has certain keys in it. How do i do this? i thought form.HasKey() would work but then i found out there is no overload and really just tells you if its empty or not. How do i check for a key without causing an exception? The key is allowed to be empty. ...

asp.net 1 formview, 1 gridview, 1 detailview and entitydatasources

Hi All, I have a formview of customers and below it I have a gridview of contact points for the displayed customer. And below that I have a detailview (insert mode) for new contact points for the displayed customer. 1) how do i default the formview.selectedvalue in the detailview for customerid? 2) how do i get the gridview to automat...

Calling my own function during with onClick

How do I call a user-define function such as this one using the onClick attribute of a input button? More specifically what special steps must I take in JQuery and what would the HTML markup look like? Thanks function simClick(keyCode) { var e = jQuery.Event("keypress"); e.keyCode = 8; $(document).tri...

IIS 6: How can I check if server trace is enabled?

Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed. Common causes for this error are when the response is modified by calls to Response.Write(), response filters, HttpModules, or server trace is enabled. Details: Error parsing near ' <!DOCTYPE html PUB'. There are tons of re...

import profile image from facebook and show it gridview

i want to import profile image from my facebook contact list and after retrieve image i want to show it a gridview. ...

password protect asp.net application?

Hi, I have built an ASP.NET application that needs to be password protected. This application will be installed on multiple offline computers, and we need to make sure that when being installed it requires a password. But even if it requires a password, someone can easily copy the database and the published folder and duplicate the appl...