asp.net

Hierarchical data in a drop-down list on Dynamic Data site

Hello all, I'm getting into dynamic data sites (remarkably powerful), and enjoying it. However, I have a requirement that I can't seem to meet. I have a self-joined category table (Id, Name, ParentId) to create a hierarchical category structure (e.g. the categories with null ids are top level, usual sort of thing). I then have a product...

Synchronizing External Configuration Between IIS Servers in a Web Farm

I have been struggling with the best way to make sure that the certain XML configuration files stay synchronized between multiple servers in a Web Farm. I am not necessarily concerned about the Web.Config, as much as I am concerned about some of the other configuration files that are present in the application. For example, we store ca...

Concise ASP.NET Validation Summary

Hi, is there any way to get the ASP.NET validation summary control to just display the HeaderText when there is a validation error? Basically what I want is for just a simple message like "Please complete all fields marked *" to appear next to the submit button. As I'm using "*" for the error message on the validators I don't want these...

Need help in login redirect using asp.net

Hello all, I have problem with Login page.If i dont enter the Username or password it should say that"please enter a Username or password" instead its going to destination page i mean without entering anything in Login field if i hit submit button its going to welcome page actually which should not happen. Here is my code please somebod...

C#/ASP.NET/JS - onclick event shows row, postback hides row

rbnResubmission.Items.FindByValue("Yes").Attributes.Add("onclick", "getCheckedRadioFieldResubmission(this)"); rbnResubmission.Items.FindByValue("No").Attributes.Add("onclick", "getCheckedRadioFieldResubmission(this)"); So I have these click events for showing rows in a table - that part works fine. Here's an example of what the code d...

Anonymous access (IIS) and SQL Server

I just had an interview in Redmond where they asked me a ton of security based questions surrounding asp.net. One of the questions they asked was about configuring a secure intranet application to use constrained delegation to access the SQL Server. In this scenario an AD user account is delegated access to the SQL Server. The whole p...

ASP.NET Page says I need to reference an assembly that does not exist!

My asp.net site has to run on several client servers. It's working fine on a majority of them, but a couple have run into an error message on a few pages: Compiler Error Message: CS0012: The type 'MetaNameValuePair' is defined in an assembly that is not referenced. You must add a reference to assembly 'App_Code.t_3vcono, Version=0.0...

Paging & Sorting grids with ASP.Net MVC

I'm new to MVC, and am not following how you'd do paging and sorting on a grid. I'm used to using the asp.Net GridView control with an ObjectDataSource pointed at objects in our business layer - and in that case the ODS handles all of the paging & sorting using the methods that our ORM generates on the objects. I've looked at using the...

Synchronizing Ajax Toolkit Calendar Extender

I have two Ajax Toolkit calendar extenders. One of them is a start date and the other is the corresponding end date. What I would like to happen is when a date is selected in the Start calendar the End calendar will jump to that date. This sounds pretty simple but I have been having a hard time getting it to happen. Someone put me ...

Error: Server does not support secure connections.

Ok, I have been using the following script for over a year now to send email (via gmail) from my host, and it has worked just fine (the Settings.Get() just return strings): public class Email : SmtpClient { public MailMessage Message { get; private set; } public Email(string to, string from, string subject, string body) : base(...

Asp. net and Javascript pop up windows

I am writing an intranet application and am considering the use of a pop up window. What are your thoughts on it? I am not worried about accessibility since it's an intranet app. The scenario is such as I need to be able to have the same code be used in a server page as well as in the middle of a process; which is why I decided when u...

how to fetch just 1 row from an object

this query will just one row as a result myDataContext db = new myDataContext(); var query = from u in db.users where u.userId == myUserId select u; I usually get the result out from the "query" object by using "foreach" foreach(var i in query){ username = i.username; } ...

.net development dynamically created controls need their own methods

Hello everyone, I'm sure that almost everyone programming in .net has ran into similar issues with the dynamic creation of buttons.. Example scenario.. I have a gridview and in one of the gridview fields I have a button. Normally in .net using visual studio you can easily grab the click event of the button, however since these butto...

Advice needed on REST URL to be given to 3rd parties to access my site

Important: This question isn't actually really an ASP.NET question. Anyone who knows anything about URLS can answer it. I just happen to be using ASP.NET routing so included that detail. In a nutshell my question is : "What URL format should I design that i can give to external parties to get to a specific place on my site that will b...

Why does Visual Studio 2005/2008 keep 'forgetting' to color code and format?

Does any else have a problem where when using VS2005 or VS2008, it suddenly 'forgets' to color code and format the text for you? All of a sudden it acts like its a plain old notepad editor. Sometimes if I save and re-open the file, or else re-start Visual studio altogether, it suddenly 'remembers'. I thought maybe this was because of a b...

What's the best way to show multiple checkboxes for multiple records in ASP.NET

The situation is as follows: I have a database with many RSS Categories, that in turn have many RSS Feeds. I want to display them in the following fashion: RSS Category 1 [ ] Rss Feed 1 [ ] Rss Feed 2 [ ] Rss Feed 3 RSS Category 2 [ ] Rss Feed 1 [ ] Rss Feed 2 [ ] Rss Feed 3 Where [ ] represents a checkbox. So each RSS Feed ...

Date Calculating

Hi, Can u give me a simple function in vb.net which can take number of days and date as parameters and subtract these number of days from given date. Forexample Private function Calculate(Byval p_number_days,p_date) as date Dim calculated_date as Date= (p_date) - (p_number_days) return calculated End Function ...

Error rendering control cache is not available

I have a custom control that shows a value obtained from the database (the price of the product). This value is stored in the cache for performance reasons and it works fine. However, in design mode in Visual Studio 2008, I get an error that says, "Error Rendering Control. An unhandled exception has occurred. Cache is not available" I'm...

Are you using Virtual Machine as your primary development enviroment?

Recently I have purchased a notebook that cames with Windows Home Basic (that don't have with ASP.Net/IIS. I thought in upgrade the Windows version to one with ASP.Net/IIS, but I thought in another possibility: I have an Hard Disk Case with a 360Gb HD. I thought in create a virtual machine with Windows Ultimate (installing too ASP.Net, ...

ASP.NET Custom Errors being ignored

I have custom errors configured in my web.config, but IIS 6.0 is returning the custom error specified in the Custom Errors tab of the website configuration. <system.web> <customErrors> <error statusCode="404" redirect="UrlRedirect.aspx" /> </customErrors> </system.web> What can I be missing? ...