asp.net

Why does the following bring back data only when both parameters are set?

The two procedures, SearchMaster and SearchDetails work if I run it in Sql Management Studio and SearchMaster even runs fine when I am Testing the Query when I set up the stored procedure in design view, but when I run it, no rows are created if I enter just info for the frn or business. If I enter for both, I do get data if there is a ...

It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level.

Configuration Error Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately. Parser Error Message: It is an error to use a section registered as allowDefinition='MachineToApplication' ...

Setting the default value of a DateTime Property to DateTime.Now inside the System.ComponentModel Default Value Attrbute

Does any one know how I can specify the Default value for a DateTime property using the System.ComponentModel DefaultValue Attribute? for example I try this: [DefaultValue(typeof(DateTime),DateTime.Now.ToString("yyyy-MM-dd"))] public DateTime DateCreated { get; set; } And it expects the value to be a constant expression. This is in ...

How can you change the name of the web.config file and have IIS read from the newly-named file?

Is it possible to configure an IIS site to read ASP.Net settings from a site OTHER than web.config? We'd like to have three config files in our codebase -- web-dev.config, web-test.config, and web-prod.config. Each IIS instance would be configured to read from their specific file. This way we have version control them all next to each...

Why are my text fields getting wiped out?

I've got a partial that is called by Ajax to add new line items. If I type in some data in the part ID field then click the link to Add another item, it wipes out what I just typed. View: <label>Parts Used <%= Ajax.ActionLink("Add another item", "BlankEditor", new AjaxOptions { UpdateTargetId = "partusageitems", InsertionMode = In...

Asp:Menu and Internet Explorer 8 Issue?

I installed Internet Explorer 8 and now the menu items under the top-level menu items are not being shown. The background is just white. If I check it it in IE6 or IE7, the menu items show up fine. Has anyone seen this? ...

ASP.Net Context.User.Identity weirdness

I have an ASP.Net 3.0 SP1 app that uses Form Authentication. While testing, I noticed that if I viewed a page that another user was viewing, the other users name would be displayed in the control on my master page. The Context.User.Identity is also for the other user. If I switch to different page that no one else is viewing the Con...

ASP.NET POST Problem

I'm new to ASP.NET and have a form tag on an ascx user control. I'm unable to submit the form from javascript because I found out that this form is nested inside a form called 'aspnetForm'. If I just want to make a post to a cgi, how can I accomplish this? ...

ClassiC ASP inside a IFRAME in Aspx

I have a scenario in which I am loading a separate classic-ASP application into an IFRAME which I have programmatically embedded into an ASP.Net web form. This external application uses session variables extensively, however, when it navigates from one page to another, it loses the session variables. Any suggestions? ...

ASP.NET Variable issues.

I have some terribly written ASP.NET code that is just not working right (go figure). I'm charged with maintaining and bug fixing this code, but I can barely make head or high water of it Unfortunately I don't have the time to rewrite it. If someone could help this would be great: (the code): given to you here (some minimal obfusca...

ASP.NET web.config authorization settings ignored

I have an asp.net (dynamic data) website set up as an application in a subdirectory of another site. This site requires different security settings from the top level site. Something like: <authorization> <allow roles="ADMIN"/> <deny users="*"/> </authorization> These settings are ignored in the sub site. However...

How is the lifetime of a static class affected in a stateless asp.net application?

I've defined a helper class to keep track of a small dictionary of items. it stores this information as a static property, which is initialized in the static constructor. the list is very small and will never change so I chose this method over xml or a db lookup table... however what I would like to know is, will this static property re...

How to run automatic "jobs" in asp.net?

I want to have my website do a number of calculations every 10 minutes and then update a database with the results. How exactly do I set such a timer, i am assuming it would be in global.asax? ...

Integrating custom membership provider in existing solution

I have the source for the sqlMembershipProvider and the sqlRolesProvider that MS ships and I want to modify it to use my own tables and schema. I have an existing solution that will use this provider and I'd like to debug the provider code within that solution until I'm sure it works. How do I set up my provider code in a project with...

How to read the data returned from WebRequest in asp.net ?

Hi, I am trying to integrate 3D Secure to my customer's e-shop. I need to post some data to 3DGate and get the returned result from it. I have used WebRequest for this, i have posted the data successfuly but the returned data is an Html Text which has a form in it and some inputs in the form. I need to read these values like Request.Fo...

Dropdownlist Checkbox

If you have ever used SQL reporting services, there are some dropdown lists that pop down with a checkbox list in it. It allows a user to select multi items very nicely. Does anyone know a free User control or an example of this implemented. Ok, so I know I can do this with some elbow grease and html, was just trying to see if there was ...

How do I reference config elements values in other config elements?

For example, I created a provider service that uses a database. In web.config, how do I set the provider's connection string to the main application connection string, defined in <ConnectionStrings>? ...

How to pass in runtime a index of row for DataView ?

Hello everyone, I have an question, On my page i have a DataView control, I also have a button that has CommandArgument. I know i can read the DataView as : myDataView.Rows[i].FindControl("FaqQuestion"); I want to add index value in runtime to the CommantParameter, so when i go to the Function onCommand i will know exactly from what ...

Determine if ASP.NET application is running locally

I want to know if there is a recommended way of determining if an asp application is running locally. At the moment I use the Request object and do a string search for localhost or 127.0.0.1 on the server variable but this has several limitations. The biggest one being that the Request object is not always available when I need it. ...

How can I refactor these 2 methods into 1?

I am trying to refactor some Entity Framework code where I have a Products entity and related entities for the Product's series, family, brand, etc. The series, family, and brand entities all have the same basic structure with an Id and Text property. The two methods below are very similar and should be able to be refactored to a sin...