asp.net

Bind a Javascript function to TreeView CheckBox from ServerSide ASP.Net

I have a treeView with ShowAllCheckBox property to true, I need to bind a javascript function to each checkbox on their click event. How to do this can any one suggest ? ...

Issues with Asp.net Gridview Paging

I have used the Gridview_PageIndexChanging event in asp.net.i have used the code like this: gridFileDetails.PageIndex = e.NewPageIndex During the run time when i clicked the next page,it generates an error: An exception of type 'System.InvalidCastException' occurred in FFK.DLL but was not handled in user code Additional...

How to Configure all MachineToApplication settings in your application's root?

Default allowDefinition='MachineToApplication' I have been looking around on different sites and fora, and i have a similar problem than some people had before... it is an error to use a section registered as allowDefinition='MachineToApplicat How to use this solution: Configure all MachineToApplication settings in your application's...

Search engine friendly urls in ASP dot NET

Objective was: To change pages like details.aspx?GUID=903901823908129038 to clean ones like /adrian_seo Achieved: Now using Response.AddHeader("Location", url); I am able to remove all uppercase urls. I use the following function: protected void Page_Load(object sender, EventArgs e) { string url = Request.Url.ToString(); if (...

Why a PageMethods calling doesn't work?

I have a javascript call to a C# WebMethod. The same page has another call and it is working. I debugged the javascript code, this is called: function userUpdReq_onOk() { ... var clientValidationPassed =Page_ClientValidate(); if( clientValidationPassed ) { PageMethods.RequestUserUpdate(username, email, sex, zipCode, state, city, neighb...

Where are project level imports stored in Visual Studio 2008?

I have a Web Service Application Project in Visual Studio 2008. This is supposed to be an ASP.Net 2.0 project and at some point this has been rebuilt using 3.5. VS has kindly added in project level imports to System.Linq and System.Xml.Linq, but when I have re-targeted the project at 2.0 these project level imports have remained. Beca...

Best way to read contents of web.config

I need to read the contents of the Web.Config and send them off in an email, is there a better way to do the following: string webConfigContents = String.Empty; using (FileStream steam = new FileStream( Server.MapPath("~/web.config"), FileMode.Open, FileAccess.Read, FileShare.Read)) ...

Ending Session on Browser close?

I would like to flush a user's session with my website as soon as they close their web browser. How do I go about implementing that? ...

Why is the viewstate resetting?

Background: I developed a web app in ASP.Net 3.5 in C#. It runs great but now a few users have reported that they recieve an error sometimes. I have tried to duplicate the error but it has been hard. One time though when I let the app sit I came back later and tried to move it along and it errored out. I would think that has somethi...

IIS7 url rewrite w/ ASP.Net 3.5 SP1 + asp:Login Form does not work

Hi everyone This question was kind of touched before but not the answer I was looking for. I am using the IIS7 URL Rewrite module to rewrite my pages, and now my asp.net login form does not work!!! On my master page I have this (ASP.Net 3.5 SP1 feature)... if (!String.IsNullOrEmpty(Request.ServerVariables["HTTP_X_ORIGINAL_URL"]))...

Page to obtain browser and connection information.

We write software as a service solutions using ASP.NET and C#. Occasionally a client may have an issue due to a specific browser setting / nuance. Or that they are behind an unknown proxy server. They may also be reporting issues that are actually related to localised bandwidth problems. We're trying to put together a test page that pe...

ASP.NET ScriptManager causing warning in Chrome

I get the following warning in chrome developer javascript console: Uncaught SyntaxError: Unexpected token < http://.../Question.asmx/js (line 1) Resource interpreted as script but transferred with MIME type text/html. http://.../Question.asmx/js The HTML source code looks fine: <script src="../../../Question.asmx/js" t...

open popup with asp.net menu control

Hi guys i have a terrible problem İ have to open popup window(javascript) with asp.net menu control but i cant.Menu items dont contains "attribute" so i cant assign javascript codes. How can i solve? thx your suggestions ...

.NET framework version requirement

Is there any way for a web user to determine the version of the .NET framework that is required for a particular web page they are viewing? ...

ASP.NET random slow downs

We are experiencing random intermittent slow-downs in our ASP.NET application. Most pages take between 100-500ms to render (depending on which modules are used on the page). Occasionally however - perhaps 1 in 100 requests, these figures are more like 5000-10000ms. This is not a database related issue - I have checked for slow queries, a...

Can't establish connection on local ASP.NET development web server?

I am using Visual Studio 2008, and I had an ASP.NET dev configuration working fine, but today when I try to launch any ASP.NET project within the development web server, the browser opens, but I get an error Can't establish a connection to localhost:64428 (port varying at each attempt). The problem is happening even with a newly created...

SQL queries not in one place but assembled dynamically while passing through several system layers. Is this a good practice?

I personally find that makes the life of a developer who has recently joined the project a very sad one. Without almost perfect understanding of the framework mechanisms it makes developing and debugging like a torture, since whenever I get an error or an unexpected behavior I have not a slightest idea where to look. In some rare cases C...

Problems simulating click of ASP.NET button.

I have some code like this <asp:Button ID="cancelDummyButt" runat="server" CausesValidation="False" Text="cancel" onclick="cancelDummyButt_Click" Enabled="True" /> (Javascript:) buttid = '<%=cancelDummyButt.ClientID.ToString%>'; eltoclick = document.getElementById(buttid); eltoclick.click(); The server-side code is not called....

What part of the ASP.Net framework do you use to execute arbitrary code on every inbound request to IIS?

I'd like to run a discrete chunk of .Net code for each and every request that comes through a certain Web site in IIS. This is completely isolated code -- it doesn't affect anything before or after it -- it logs some information from the request, then ends. Note that this is not something I can put in Application_OnRequestBegin or some...

Whats is the best method to localize an asp.net application?

I use .po files to translate my PHP applications. Is there an equivalent method for translating effectively ASP.net applications? Cheers ...