If you have been looking for a nice and clean way to parse your query string values, I have come up with this:
/// <summary>
/// Parses the query string and returns a valid value.
/// </summary>
/// <typeparam name="T"></typeparam>
/// <param name="key">The query string key.</param>
/// <param name="value">The va...
Hi,
In my project, my /PropertDetail.aspx can get 2 querystrings.
1st one for the PropertyId /PropertDetail.aspx?PropertyId=5
2nd one for the Language /PropertDetail.aspx?PropertyId=5&Language=2
EDIT: and this page can get one of them or can get both of them, so my rewriter rule needs to handle both of them
So, i have set these ru...
Is there a way to use a credential coming from the user's saved password list and use that instead of the local Windows credentials?
I need to look up a user's email address based on their Active Directory username to allow them to register for email updates via an intranet site. This seems easy enough if the user is actually logged int...
I have a usercontrol that provides voting buttons (for a SO type voting model) - it contains a private int member that retains the id of the record. Outside a repeater, it functions just fine - postbacks work, and the correct id is retained in the user control.
Inside the repeater, an itemdatabound event handler associates the correct ...
I'm using ASP.NET MVC RC1 and trying to bind a textbox to an object property like so:
<%= Html.TextBox("Comments.Contacts[0].ContactName") %>
It seems like it should work, since this does:
<%= ((MuralProject)ViewData.Model).Comments.Contacts[0].ContactName %>
But alas, the result in the textbox is an empty string. Am I doing someth...
I ran into a problem recently when using a repeater that I was adding dynamic controls into and although I've got a workaround that does functionally exactly what I want it to do, I'd like to know if there is a better way to do it for my understanding. I've been working with ASP.NET for about 6 months now, and everytime I think I've got ...
Hi all,
I'm currently building an app where i need somewhat of a lookup control.
How this would work is that there is a texbox with a lookup button on a form.
The user can either type in a value for the textbox or can choose the lookup button.
When the user presses the lookup button a javascript window with a gridview and a list of colu...
2 questions:
Does using MVC make it any easier to build 508/WAI compliant sites?
Anyone know of a good asp.net based CMS platform that is 508/WAI compliant or at least, tries to make it easier to build sites that are?
...
Other than because session storage is session-global to more than one page, why would you ever want to use the viewstate to hold values?
It seems kind of ridiculous to send any kind of information other than a few small query string like values, back and forth from the client to server. I mean what a waste of bandwidth(!), simply for s...
I'm trying to find a way to programmatically check if a particular HttpModule is loaded (as a component I'm writing requires the module to work correctly). I'm trying:
bool ismodulepresent = false;
foreach(HttpModuleAction module in ((HttpModulesSection)ConfigurationManager.GetSection("system.web/httpModules")).Modules)
{
if(module...
I need to insert new records into an Access database.
I'm using Visual Studio 2008 and firstly create a asp.net website. I can connect to the information in Access databse using dataview or gridview and can query a particular entry (ie. Proposal No. -brings up all details linking to that proposal).
I can then edit the details of that pr...
Hi,
I have multiple drop down lists on a page. They all contain list of countries. So in the background I am getting countries from database and caching them. I would like to populate those drop down lists from another thread.
I am also using AJAX controls so I wanted that it all happens at the same time. And also after a user selects a ...
Hi,
If I have a small microsite and on the first page I want to ensure that the user cannot jump to a non secure page between (e.g. 2 or 3), what would be the best way to implement this? The next page can only be seen if the user sets a certain item in a drop down box.
My first thought is cookies. If the user goes to the second page an...
I'm trying to find an event that will fire immediately after all Application_Error event handlers so that I can modify the response sent (messing with the status code and 'location' headers and creating a new body specifically) using a custom HttpModule.
I've tried hooking into Application_EndRequest (as I've read that this is the only ...
I'd like to get stories on how people are handling tracing and logging in real applications. Here are some questions that might help to explain your answer.
Frameworks
What frameworks do you use?
log4net
System.Diagnostics.Trace
System.Diagnostics.TraceSource
Logging application block
Other?
If you use tracing, do you make use of ...
In my Live sql database ,I have to change the date value from (date, month ,year) to date.
Now there is 100 records with the date as date,month ,year(3 Fields).iF I change directly to date Field all the datas in the 3 field of those 100 records will automaticly change to a default date and original dates will disappear.What should i do ...
How can I export the data in my webapp to an Excel sheet from ASP.NET (VB.NET,SQL 2005)?
...
I have an ASP.NET web application that includes code for enforcing its own database schema ; this code runs on application start.
I've recently started using LINQ to SQL, and I've added a pre-build event to run SqlMetal on my database so that I get objects representing my db tables.
What would be really cool is if I could enforce the ...
I've created a custom GridView server control. The next thing I'd like to do is to use my own custom TableCell Collection with that GridView so I can set some custom properties and etc. Countless hours of Google searches have made me dizzy and yielded no real results.
Does anyone have any tips on how to accomplish integrating a custom...
I am building a real estates website, I want to include some details on the homepage about the current weather, temperature, humidity, etc. I may also want to include some exchange rates.
It all should be current and up-to-date, I know there are plugins or add-ons I can use which requires me zero-coding. I just don't know what to use.
...