asp.net

how to use asp pages in asp.net

hi everyone... I want to use asp page in my asp.net application without any modification in asp pages. further I want to add master page in my .net application.So i need the changes to be reflected in the asp page also. is it possible....any how? or any alternative to use this..? pls suhggest me .....thanx in advance... ...

Windows Authentication Only Works With hosts entry

I'm setting up a (ASP.NET) website to be used internally at my company. In IIS, I've turned on Integrated Windows authentication and turned off anonymous access. Once I've done this, the website pops up the "enter your username/password" box whenever you visit the site, but won't log you in even if the username/password are correct. This...

Set Path dynamically in Forms Authentication

Here's the problem we facing. In a hosted environment setup, we're hosting the same project multiple times. We currently manually specify a Path in the forms config section of our web.config. However, to smooth out our deployment process, we'd like to set the Path depending on the Virtual Directory name. Is there a way for us to dynami...

ASP.NET check on thread status on long running thread?

I have a situation where user requests to do a long running process. I planing to start it on another thread in code-behind and return message to user "processing". Then every couple of seconds or so I will poll(via asynch call) the thread for its status. When thread is done I want to show success message. Question, how do I poll a ...

Programatically batch files to copy at night

I need to create an Intranet website (page) which allows users to indicate a local network folder to copy to a production location. Currently this is done manually using xcopy in batch files. What I am looking for is approaches on triggering the copy so it's done in the middle of the night and an approach to copy the files. I suppose ...

Is it possible to fire off another button's onclientclick event??

I have a modal popup that has a targetId to a hidden button. I want the popup to occur when a button in a grid is clicked but that button is programmed behind the code and therefore the targetId would be invalid... So I wanted to attempt to set the gridview's button's onclientclick event to be the onclientclickevent of that hidden butto...

How to create a simple Custom Container control with 2 Divs inside?

Hi Guys Im looking to create a custom ASP.NET container control that will allow me to drag further controls into it within the VS designer. The final HTML that im looking for is very simple.. <div id="panel1"> <div id="panel2"> </div> <div id="panel2"> </div> </div> With additional controls being able to be dragged i...

asp.net custom onfocus event for textbox

Is it possible to create a custom onfocus server side event for a textbox control? I would like to simply fire a server side method when a textbox has focus. ...

ASP.NET DataGrid and HoverMenu Extender

I have an ASP.NET DataGrid that I am trying to add a HoverMenu Extender to. The grid markup is as follows: <asp:datagrid id="dgrExisting" runat="server" autogeneratecolumns="false" cssclass="FormattedTable" onitemcommand="dgrExisting_ItemCommand" onitemdatabound="dgrExisting_ItemDataBound"> <headerstyle cssclass="Format...

ASP.NET 1.X to ASP.NET 2.0: Broken Validation on Postback

Good Day, We have migrated our web application to ASP.NET 2.0 from ASP.NET 1.1. We have a page that contains a couple of textboxes with their respective Validators. On .NET 1.1, when a textbox contains an INVALID value, clicking on the "submit" button, will not produce a postback (E.G. Nothing will happen). However, when we migrated ...

ASP.net: read Web.config return zero setting

Using the code snippet Here Dim appConfigs As System.Configuration.Configuration appConfigs = System.Web.Configuration.WebConfigurationManager.OpenWebConfiguration(Nothing) If (0 < appConfigs.AppSettings.Settings.Count) Then Dim guaranatedServiceRequestAppSetting As System.Configuration.KeyValueConfigurationE...

.netCART Credit Card Decryption - IIS 7 App Pool and Decryption issue

I've got a site using .netCART. It's running fine in production with Windows Server 2003 and .NET 2.0. On the new server (Windows Server 2008) everything is working except for credit card decryption in the store admin. No errors are being sent, no exceptions thrown, just the encrypted string being output to the screen instead of a decryp...

Storing salt in code instead of database

There have been a couple of great discussions regarding salt best practices, and it seems the overwhelming recommendation is to generate a different salt for each password and store it alongside the password in the database. However, if I understand the purpose of salt correctly, it is to reduce the chance that you will be compromised b...

How to detect .Net application type?

I have a library that needs to respond to exceptions in different ways depending on whether it is running in a Console app, WinForms, AspNet or Windows Service. I have experimented with looking at various properties in the System.Windows.Forms and System.Web namespaces, but I can't find a reliable way of detecting exactly which kind of ...

Can the ASP.NET Yellow Screen of Death (YSOD) be generated on demand or captured?

We'd like to just capture the YSOD output to use in an erorr reporting email, from a Global.asax error handler, for instance. Is there any way of leveraging the built-in ysod generator? ...

ASP.NET 2.0 JQuery AJAX Login

I'm trying to figure out how to implement an AJAX login for a ASP.NET 2.0 site with Jquery. I already have a implemented other simple Jquery AJAX application on the site, but I'm unsure how to convert over the standard login control to POST via AJAX. Should I expose the login.aspx page methods? Any help would be great. ...

Generating a Xml document from a simple XSD schema

I have a xsd file and I need to generate a xml file from it. What is the easiest way to achieve this? EDIT: There is a similar question here and so i want to close my question. However if you have an answer please post it... EDIT: One of the respondents deleted their answer, but i found it to be the simplest solution that works for me....

How to debug leaking connections in an ASP.NET 2.0 Web Services application?

I have an app, which is a bunch of c# web services sitting on top of ASP.NET 2.0 in IIS7 on Win2k3. Following the last release, we keep getting connection timeouts. A quick investigation using Perfmon confirmed that our application is leaking connections. However, there have been so many code changes in the last release, that it is r...

How to write correct Regex for url's on the page without anchors?

Hi all, I want to cut all url's like (http://....) and replace them on anchors <a></a> but my requirement: Do not touch anchors and page definition(Doc type) like: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt; So I need to find just plain text with url's... I'm tryin...

ASP.NET App Settings Directly in Markup

What is the syntax for accessing a AppSettings directly from the ASP.NET Markup? I can't remember exactly, but it was something like '<%= $.settingname %>' ...