I am currently working on an ASP.NET MVC2 application and would just like to know the best way of achieving the following:
Each user that logs into the site pays membership fee which lasts X amount of days. I record the membership payments and the expiry dates in the database.
I would like all users to be able to login even if their me...
[This might be better on serverfault, if so, I'll move the question over there - but thought there's more asp.net devs here so more chance of this behaviour having been seen by someone else]
I've been trying to track down the .NET setting in IIS that governs this behaviour, but with no luck...
In brief, we have a Server 2008 R1 box run...
As the title really. I was wondering if changing just the text in a Webforms *.aspx file will cause the site to recompile and therefore drop any existing sessions?
Thanks
...
Hello,
I am facing a very strange issue. I get an error Object Reference Not set to instance of object on the server while the code runs fine on my dev machine. The strange part is the line number where the code is throwing error (as appears in the Stack trace)
DemoUser demoUser = new DemoUser();
if (!Request.QueryString.AllKeys.Conta...
Could some body explain exception vs error in asp.net
...
I have just coded the below regular expression. I have a mini rich text editor on a web page (very similar to the one I am using to post this question) and I want to make use of a double asterisk to indicate which words/phrases should be wrapped in a strong tag. The aim is to allow the user to add pre-defined HTML elements without actual...
Hi,
Using IE 8 there's an option to "Export to Excel" when you right click on a grid view.
Within ASP.NET I'm filtering on varions columns and returning a smaller view of the data.
If right click and "Export to Excel" I get the unfiltered results, not the results displayed on my web page!
Anyone know what I'm doing wrong / how to res...
Guys, as the title suggests, I am required to control access to a specific file on our server. I suggested, for the time being (rather than affording time for other routes until we can), that we simply use the web.config to lock this file down to everyone by means of a location/system.web/authorization setting.
This soon failed to prote...
Hi,
Currently working on an ASP.NET web app and am starting to realise i'm writing the same Boiler Plate Code Over and Over Again..
i.e.
SqlDataReader myReader = null;
SqlCommand SQLcmd = new SqlCommand();
SqlConnection SQLConn = new SqlConnection();
String SQLStatement = "Select this 'nd That";
...
Hi
I have Jquery & ASP.NET server side.
I am looking for a way to safely post data from a client to the server and vise versa without worrying of special characters like ",'~ etc...
Is JSON a better way?
Thanks
...
I have written a class library function that parses a string to a control. It takes the current page and uses page.ParseControl to parse the string as a control.
System.Web.UI.Page page = (System.Web.UI.Page) HttpContext.Current.CurrentHandler;
System.Web.UI.Control ctrl = page.ParseControl(str);
It works fine in most scenarios excep...
I have a GridView that I render to html and export that to MS Word, Excel , PDF etc.
I need to programmatically make column best fit and autosize them to fit their inner text.
Is there is any way to do that?
...
Hello. I'm quite new to ActiveRecord and i got handed an old project where the customer want some updates done. It's an event signup system.
The system have the following classes;
Registration (holds address information etc for a registration)
Event (the event to which participants sign up)
Participants (people who've signed up to the ev...
i need to verify if the password is correct for a user.
i have this code:
private bool checkOldPasswordValid(string password, string username)
{
using (DirectoryEntry entry = new DirectoryEntry("WinNT://" + Environment.MachineName + ",computer"))
{
entry.Username = username;
entry.Password =...
I have a webservice (.asmx) and I want it to retain a value on a per-user basis. Is this possible?
ie (pseudo-code)
MyWebservice
{
object perUserVariable = something;
[WebMethod]
public void myMethod()
{
if (something == null)
{
something = doBigExpensivedatabaseCall();
}
return something;
}
}
...
When I am editing VB code inside a .aspx file in Visual Studio 2010, my code is automatically indented in a bizarre way. I have searched through the options and can't find anything that fixes this. [I thought unchecking Pretty listing (reformatting) of code in Text Editor -> Basic -> VB Specific would for sure do the trick but it didn'...
Hello all,
I am running Visual Studio 2008. I cannot get the auto format to work on the source code of my aspx page. I have tried it from the edit menu and the ctrl K, D. Nothing works. If I manually fix everything, the next time I open the file the formatting is gone. Here is a sample of what it looks like:
<cc1:TabContainer ID=...
I have a current project running using APE that needs to work on C#/.NET... I was wondering if anyone had any suggestions for either a method of approaching Reverse AJAX/Comet on C#/.NET or any packages such as APE that are available.
EDIT
For clarification, APE doesn't work on Windows. Which is a restriction I have with the project.
...
I am looking for an event firing before a DropdownList auto-postback to save Listbox items (populated with JS) in the ViewState.
I tried the OnSelectedIndexChanged event but it's fired too late.
Can this be done, and how?
...
which is more efficient/better code. to use is object and then unbox if it is that type of object?? or use try catch
WizardStep parentWizardStep;
try
{
parentWizardStep = (WizardStep)this.Parent;
}
catch
{
throw new Exception("Unable to cast parent control to this type.");
}
OR THIS:
WizardStep parentWizardStep; ...