asp.net

HTTPS ASPX page Redirect to HTML page logs user out - as if session lost

Greetings, everyone: Firstly, sorry that my Flow description is long winded, but I think it might help with describing the problem. Background: Building asp.C# shopping app that is using a hosted payment page to process payments (using posting of data to a hosted payment page). SSL certificate is signed and installed. Flow: Prelim) ...

Multiple Application_Start events firing

I am debugging an ASP.NET 2.0 application that is suffering from slow loading of the initial page. Through adding logging, I've found that the Application_Start event fires twice on startup with a short delay between the two events. The Session_Start event also fires twice, with the same Session ID value. e.g. [Header] 2010-09-10 14:...

JQuery: how to get the value of an ID from Master/Content page in ASP.NET

i have this in my content page: but i am getting null value if i try $("#ctl00_cphMaster_CloseButton"). $(document).ready(function() { $("#ctl00_cphMaster_CloseButton").click(function() { jConfirm('Can you confirm this?', 'Confirmation Dialog', function(r) { if (r == true) __doPostBa...

Where should temp files created by the MS Chart control go?

The default location: <add key="ChartImageHandler" value="storage=file;timeout=20;dir=c:\TempImageFiles\;" /> is fine for development, but not so good for deploying on IIS. I found a forum post that mentioned you could drop the path altogether, which dumps the temp file(s) directly in the root of my project <add key="ChartImageHand...

Specify CLR namespace of auto-generated web service proxy class

When you add a Web Reference in an ASP.NET project in Visual Studio the web application's root namespace is always added. So, if I add a web reference called MyWebService and the default namespace of the application is MyApplication the namespace of the generated proxy class will be: MyApplication.MyWebService. However, I want to be ab...

Finding the previous and next sibling controls

Is there a way to find the previous and next sibling controls in an ASP.net form from code-behind, similar to findControl()? Sometimes you don't want to assign an ID to a control just so you can do a parent().findControl("ID") in order to find it. I'm tired of coming up with IDs when all I could do is previousControl() or something (a l...

Using routing with webforms - CreateInstanceFromVirtualPath sometimes very slow

I am using routing with my ASP.NET WebForms application, using the technique described by Phil Haack: http://haacked.com/archive/2008/03/11/using-routing-with-webforms.aspx This works well most of the time, however on on occasion the first call to System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath is takes tens of seco...

How to reuse service layer in WCF and standard ASP.NET scenarios

I'd like to be able to create standard POCO service that I can use in two distinct workflows: in-process i.e. consumed by my ASP.NET webforms application remotely via an exposed WCF endpoint to be consumed by other applications Is there a way to re-use the same service and its return data types in both scenarios above? Ideally, my co...

Unable to see programmatically entered events in Google Calendar.

I've written a entry form for our company employees to enter marketing courses into the DB and at the same time add them to a Google Calendar. The Calendar is accepting the events, but the coloration of the event is different from a "manually" entered event using Google's interface. This leads me to believe that there is some property ...

"Invalid postback or callback argument" after new deployment

Recently deployed a project into production and have run into the "Invalid postback or callback argument" error. We haven't encountered this in testing at all and after some research have found that the problem occurs in the following situation: Old version is published and accessed. New version is published and accessed without cleari...

Register Client Script with Dynamically Loaded Control in Ajax Call

I have a page that contains a custom tab control. When you click different tabs, it does a an ajax callback. During that ajax call, the code dynamically loads a different control based on which tab was clicked, then adds it to the appropriate tab. So basically I have some code that does a switch statement, uses LoadControl(), then adds t...

Should I extend ASP.NET Security for a public site?

I have a ASP.NET MVC site with a private site administration application secured with ASP.NET sql-backed authorization. I need to add a login for the public site to allow visitors to sign up for an account. I am thinking I should create totally seperate storage for the public site, rather than extend the existing user db and rely on rol...

Adding muliple rows inside of Gridview row

Hello, I am working with Gridview control and I am also adding radio button to each row in ASP .NET. Here is something that I would like to accomplish but I am not sure how this should done. The problem is that I have add a muliple datarow insie of the each gridview. Something like below. So, some cases I have add a row with two row...

asp/vb6 to .net 2.0 - help

oXML = Server.CreateObject("Msxml2.DOMDocument.4.0") oNode = oXML.createElement("CommonCustomerSearch") oRoot = oXML.appendChild(oNode) can someone post a .NET 2.0 equivalent of the above lines of code please? i actually found some sample code that seemed to be what i was looking for, but i believe it was using .NET_4 classes. i need a...

Why does asp.net onclick event not change the button text when the button is clicked?

Obviously I am a total noob and this is simple to some of you, but I can not figure out why the rest of the sub works, but the button1.Text="Uploading, Please Wait..." seems to be completely ignored. The button is supposed to change text when clicked but no method I have tried works with my page. Any ideas? Here is my simple uploa...

Securing single sign-on to web application

I need to create a single sign-on structure and my question is: is SSL a must? Details: The application will have a link to my web application. When the user clicks that link, their local username will be passed to my web app at which point a look-up in a mapping file is done. If that local username exists in the map, then the user is l...

"Nested" Visual Studio 2010 Web Applications

I have a Web Application that I regularly update and publish to my website. I also have a /projects directory in various projects I'm working on. Some of these projects are Web Applications (or Web Sites) themselves. Directory Structure is like this: /www default.aspx /static... /bin... /etc... /projects ...

How to tell who called an HttpHandler

How can I tell from within an ASP.NET HttpHandler if it is executing because of a call to Server.Execute("myHandler.ashx") or because of the user linking directly to myHandler.ashx? (Besides using a querystring parameter). ...

How do I programmatically rename a Sharepoint directory (SPFolder or SPListItem)?

I have tried this: SPFolder folder = ...; folder.Item["Name"] = newName; folder.Item.Update(); And it behaves mysteriously. If I run it, it throws an exception: SPException: Cannot complete this action. HOWEVER, if I stop it in the debugger after the new Name assignment and before the Update(), and look at the properties of folde...

how to compare two column value in GridView?

protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e) { string[] Cardio = (string[])objDocter.getDocter_acc_prof(); if (e.Row.RowType == DataControlRowType.DataRow) { if (e.Row.Cells[2].Text == "Heart problem") { DropDownList ddlAssignDoc = (Drop...