When creating a new ASP.NET application in Visual Studio, a couple of files and folders are created automatically. One of those folders is called App_Data.
Also when publishing a website by selecting the menu option Build->Publish a checkbox is available Include files from the App_Data folder.
Am I right assuming that the files put in ...
I dynamically load a UC in the Oninit of the host page.
In the Oninit of the UC, I raise an event. I get a null reference exception. The code is as below:
//In the UC
public event CommandEventHandler DoneProcessing;
protected override void OnInit(EventArgs e)
{
//Raise a event
CommandEventArgs cmdEventArgs = new CommandEv...
Hello All,
I have read several articles regarding templates for web site content. They all seem to recommend that the columns should be placed on your site via floats. Example:
<div id="container" style="width: 1000px;">
<div id="main_content" style="border: solid 1px Black; width: 798px; /* width = 800px -2px for border */ floa...
I got this working by trial and error but would really appreciate an explanation.
Summary: I am dynamically loading usercontrols from the host page.
Host Page .aspx
OnInit does a LoadControl and loads the control
User control .ascx
On Page_Load
-> First time load
--> I set a value to a hidden input type variable
--> I set a ...
As I've stated before I'm working on a digg clone to teach myself ASP.NET MVC Inside and out but I've hit a road bump that I can't seem to avoid.
I want to be able to optimize this application as much as possible so I have my DAL which is a bunch of classes of ...Repository : Repository. Now to help optimize for performance I have my b...
I have your basic asp.net web form which contains some client-side JavaScript that forces the page to time out and then redirect after 5 minutes. Mainly to protect possibly sensitive information.
At timeout, I want to force a server post back allowing me to save the form values for future edits.
I have played with both ClientScript.Get...
I have a web application that uses Integrated Windows Authentication to validate users. Most of them are remote and don't have access to a workstation to update their AD password.
Rather than manually managing passwords my self, I'd like to put together a script so they can change them on their own.
How would I update their windows pas...
I am attempting to import a Json string by using:
AreaField areaField = new AreaField();
areaField = (AreaField)JsonConvert.Import(typeof(AreaField), HdnData.Value);
The class definition is as follows:
public class AreaField
{
public List<AreaFieldItem> AreaFieldItem { set; get; }
}
public class AreaFieldItem
{
...
I am doing some asynchronous work on a separate thread using:
ThreadPool.QueueUserWorkItem(...)
and in this separate thread, I need to call HttpContext.Current so that I can access:
HttpContext.Current.Cache
HttpContext.Current.Server
HttpContext.Current.Request
however, HttpContext.Current is null when I create this separate threa...
I'm working on an approach to trace logging for my company's VB.NET project. The .NET framework has pretty versatile trace capabilities and I'd like to use what .NET already provides. My company wants to stay away from 3rd party software, so log4net and whatnot is out of the question.
They want to be able to trace the flow of the web ...
So, I am working with .NET. I have an XSL file, XslTransform object in C# that reads in the XSL file and transforms a piece of XML data (manufactured in-house) into HTML.
I notice that my final output has < and > automatically encoded into < and >. Is there any ways I can prevent that from happening? Sometimes I need to bold or i...
Hi,
I want remove "Language" querystring from my url. How can i do this ? (using Asp.net 3.5 , c#)
Default.aspx?Agent=10&Language=2
I want to remove "Language=2", but language would be the first,middle or last. so i will have this
Default.aspx?Agent=20
...
How should I configure the URL Rewrite Rule in IIS7 to redirect my aditional domains ( domain.net, domain.org, domain.info) to the principal .com domain?
...
I have looked all of the place for this and I can't seem to get a complete answer for this. So if the answer does already exist on stackoverflow then I apologize in advance.
I want a unique and random ID so that users in my website can't guess the next number and just hop to someone else's information. I plan to stick to a incrementing ...
I have a query string parameter value that contains an ampersand. For example, a valid value for the parameter may be:
a & b
When I generate the URL that contains the parameter, I'm using System.Web.HTTPUtility.UrlEncode() to make each element URL-friendly. It's (correctly) giving me a URL like:
http://example.com/foo?bar=a+%26b
The...
I am looking into using only a ddl to run my query, not a ddl and a Button_Click function. I am yet to find what to do. How do I do this?
...
This works just fine:
protected void txtTest_Load(object sender, EventArgs e)
{
if (sender is TextBox) {...}
}
is there a way to check if sender is NOT a TextBox, some kind of an equivalent of != for "is"?
Please, don't suggest moving the logic to ELSE{} :)
thank you.
I knew it had to be easy :)
...
Here is the scenario:
IIS 6 and SQL Server 2005 on same machine:
I have just created a new application inside of my main website in IIS.
The root website has its own database. The application I just created under the root site has its own database, as well.
ASP.net pages in the root site connect to their database using trusted securi...
What are the suggested methods for using javascript files with MOSS 2007 ? in the 12 Hive somewhere or directly in the site's virtual directory in a scripts directory ? Or possibly as a embedded resource in a webpart ?
...
I have a 3-man .NET web shop. Over the years we've developed a number of tools for content management, blogging, e-commerce, social network, and so on. We've never really modularized the software, though; so that porting functionality from one site to another is labor-intensive (we typically just copy and paste bits of code and other ass...