asp.net

Populating dropdownlist client side. Getting post back validation error.

I have a webcontrol with two dropdownlists on in. When you choose something from the first, the second is populated accordingly. When post back occurs I get the old: Invalid postback or callback argument. Event validation is enabled using in configuration or <%@ Page EnableEventValidation="true" %> in a page. For security...

knowing if a site was published in release mode or debug mode

hi all! how can i tell the diffence between a website that has been published in release mode and the same website that was published in debug mode? thank you ...

ASP.NET Authentication "Remember Me" CheckBox not staying checked

I am having problems with my login page. It pulls through the Username correctly from the cookie, however the CheckBox for Remember Me does not become checked when I view the page, even though the code for setting it on the Page_Load is being executed. LoggedIn event for setting the cookies protected void lLogin_LoggedIn(object sen...

Import contacts from hotmai, live, gmail,, yahoo

I wounder if soemone know which APIs I need to use if I want to create a importer, just like the one in facebook. importing users and their e-mails. ...

RegularExpression for URL Rewriting

I am using urlrewriter.net and I am trying to make a redirection. So here is the condition, If the requested url doesn't end with a / (slash) and then add / at the end of the url and redirect to added url. So if the url is "http://www.something.com/cases" then add / and redirect it to "http://www.something.com/cases/" I've use...

Given a C# list of some object (perhaps serialized to XML), what is the easiest way to create a flexible reporting application for that data?

I'm specifically interested in ASP.NET or ASP.NET MVC as the platform, but any contributions for the good of the community are welcome irrespective of platform! As such, there is no one right answer - hence it's a community wiki. We don't want to reinvent the wheel, and building a GUI to filter the data seems like overkill. Is Repor...

Temporary problems sending emails with ASP.NET

I hate to just post a stack trace here, but I am out of ideas... My app sends emails for various tasks on the website, and 90% of the time there are no problems. However, every so often ASP.NET throws a weird exception, which seems to relate to mail server connectivity (I use google business servers for email). The error is too generic f...

In ASP.NET MVC 2 - How do I get Route Values into my navigation controller so I can highlight the current link?

I'm trying to get the current Route into my navigation controller so I can run comparisons as the navigation menu data is populated. My Links object is like this: public class StreamNavLinks { public string Text { get; set; } public RouteValueDictionary RouteValues { get; set; } public bool IsSelected { get; set; } } In t...

How can I grab user name from XML via LINQ to XML?

I need to record a user's name that is using an ASP.NET web service. To do this, I created a SoapExtension that captures an incoming Soap envelope and converts it to an XDocument. The problem is I know nothing about LINQ to XML and the examples I've reviewed don't quite seem to work with the SOAP envelope. The SOAP message looks like ...

Asp.net Web from Dynamic Controls Based on Dynamic controls

I'm using a wizard control, step 1 has a list box with a list box containing entries 1-10. Step 2 then dynamically build and displays 1 list box per entry. Each list box in step 2 contains 5 entries each. I have one more step that needs to read the list boxes from step 2 and get their values to display 3 radio buttons per choosen entry f...

ASP.Net validator styling

I have multiple validators on a textbox (see structure below). When the RequiredFieldValidator passes but the CustomValidator fails there is a gap between the Textbox and the CustomValidator as the RequiredsFieldValidator has a Hidden CSS property. [FieldLabel] [TextBox] [RequiredFieldValidator] [CustomValidator] The HTML output from ...

ASP.NET Impersonation by Role

I modified the ASP.NET login control to also allow specifying UserRole ('Employee' or 'Volunteer'). Users are authenticated via a call to a webservice written by our client, which accepts username/password/role and returns true or false. If role is 'Employee' it represents an active directory user. The application should impersonate th...

Implement Task Recurrence Pattern in .NET like Outlook?

Hi,I have to implement Scheduler like outlook in my .NET application.I have already started working on it but I can't implement Recurrence Pattern.please suggest me that how could i achieve this functionality. how to save task with Recurrence in database? I found this RadScheduler for ASP.NET AJAX but unfortunately this controller is com...

ASP.Net Membership logging in successfully, then redirecting to login page

We're having a load of problems with an ASP.Net Membership application at the moment. For reasons that aren't relevant, we're using a MembershipProvider implementation that uses the old-style Web.config specified credentials and a RoleProvider that just allows everything (the RolesProvider may be the problem here!). This isn't something...

Forms authentication service not working

I have a desktop app I authenticate using the wcf authentication service login method, by calling the desktop application. Everything seems to work. I then open internet explorer and try and browse to a protected page. I get bounced to the login. Why? How can I authenticate using the WCF Service? ...

ASP.NET Intranet App Using Windows Authentication Reports Previous Login Name

I'm currently troubleshooting an Intranet application hosted at our company. In this application, Windows Authentication (Integrated Mode) is used to obtain the IPrincipal object for the current user and the current user's name (i.e. "DOMAIN\Joe123"). Our domain is 4 characters long, so the individual who put this code together is grabbi...

PostBackUrl in RadPanelBar Telerik

Greetings everyone.. i would just like to ask.. how do i assign a postback url in my radpanel items in my master page Eventually i have a MasterPage wherein i construct my radpanelbar.. and i have this Item Quiz with a child name Create What i want to achieve is when i hit the button Create in my radpanelbar it will make a PostBackU...

expandable within Gridview?

Hello, I am working on asp.net project and using Gridview control on one of the pages. I want Accordion style with table look like view (with columns) on Gridview. This is what I want to do. Say, I have columns called name, ID, Name, and Year and have a couple of rows like, Ford 2010 Honda 2010 Suzuki 2010 ... Now what I want do i...

How to change Individual Lineitems fonts for Checkboxlist?

Hello Guys, I am using a checkboxlist which I am populating from the database using Databind(). And i am having Dropdownlist in UpdatePanel to avoid postbacks which is also populated form database. Each Item in dropdownlist-> Associated to Many Items in Checkboxlist. Is there any way I can Make Associated listitems bold(to highlight the...

ASP.NET MVC - Unit testing, mocking HttpContext without using any mock framework

Since I'm having problem with unit testing RenderPartialViewToString() with Moq framework (http://stackoverflow.com/questions/3621961/asp-net-mvc-unit-testing-renderpartialviewtostring-with-moq-framework), I'm thinking about getting my controller directly, without using Moq for these particular test, however, how do I mocks (or set) the ...