I am developing an ASP.NET 2.0 website. I have created data access and business logic layers. Now in the presentation layer I am returning data from the business layer as a dataset.
My question is whether to use a dataset or object collection (for example a Category object representing the Category table in my database). I have defined ...
As soon as I started programming C# (ASP.NET) I was surprised at how restrictive constants were. So far, I haven't used them much and I feel I missed the concept. How would you guys make use of constants in a typical ASP.NET application?
How would declare a constant struct such as System.Drawing.Color?
Would you guys use readonly when ...
I'm trying to figure out the best way to do caching for a website I'm building. It relies heavily on screen scraping the wikipedia website. Here is the process that I'm currently doing:
User requests a topic from wikipedia via my site (i.e. http://www.wikipedia.org/wiki/Kevin_Bacon would be http://www.wikipediamaze.com/wiki?topic?=Kevi...
I am currently working on a large-scale website, that is very dynamic, and so needs to store a large volume of information in memory on a near-permanent basis (things like configuration settings for the checkout, or the tree used to implement the menu structure).
This information is not session-specific, it is consistent for every threa...
I need a good logout code block for asp.net. Currently after you logout you can hit the back button and continue using the site.
...
I am trying to render xhtml from cute editor output to display rich text in my page. I'm trying this but it doesn't seem to be working for me.
//ce_Document is my instance of cute editor
public void btn_SaveMessage_Click(object sender, EventArgs e)
{
XhtmlTextWriter xtw = new XhtmlTextWriter(System.IO.TextWriter.Null);
xtw.Writ...
This may be a security issue...
I have an IFrame on my page w/ an .ashx src. The handler does something like
context.Response.ContentType = "text/html";
context.Response.Write(@"hello world");
If I navigate to the handler directly in a new browser window I see the "hello world"
If I try to open the handler in the IFrame it fails on ...
hello,
I have an ajax autocomplete on a page ASP.NET. This calls a method from a web service which returns some postal codes.
public string[] GetNames(string prefixText, int count, String contextKey)
{
prefixText = prefixText.Trim();
XmlNodeList list;
List<string> names = new List<string>();
if ((prefixText[0] >= '0') &...
I have an application which connects to a database, retrieves a username from a user's table and matches it against the username retrieved with System.Security.Principal.WindowsIdentity.GetCurrent.Name
On my localhost, everything works fine. The database exists on the development server but the application lies on my localhost. All of...
I am having issues with regards to running my ASP.NET MVC application thru my local IIS 5.1 web server. I believe these issues are related to IgnoreRoutes, but I can't seem to craft an IgnoreRoute such that it resolves the problem.
Problem:
I am able to view my elmah error page (localhost/mvcapplication1/elmah.axd), however, the CSS i...
What is the best way to still show column headings on a GridView that doesn't get any records when using LINQDataSource?
...
I'm working on an asp.net website that uses FusionCharts v3.1 code to render graphs as swf files.
I need to write code to allow users to re-create and email these graphs on a scheduled basis. Our product uses a service to take care of scheduling and email events so I need to modify the code to first render the data as a graph, save it ...
I am trying this. I have built asp.net website.
When I publish to IIS through VS2008 it works fine.
Lets say my site is at c:\projects\Website1\
I want to publish it to c:\Inetpub\wwwroot\WebsiteOne
I am trying to mimic publish from studio. That is publish and remove anything that is in side.
I tried this:
aspnet_compiler -v/WebsiteOne...
Greetings.
Is there a good way to determine what is calling my Page_Load method? I've got a few Componentart WebUI grids that call it, although I've checked all of those (using the gridName.IsCallback property). I've also got an update panel, but I'm not sure how to check if it is the caller.
I'm betting there is a property somewhere...
is it possible to display, with a click of a button an entirely different form on the same aspx page? please take note that although i have experience with vb.net, i have almost none with asp.net. thank you very much for your responses
...
Hi
i am developing a project (using 3-tier approach) in which i am using LINQ TO SQL...
i want to update user...
but i am facing some problem. it does not give me any error but also do not update the user detail
here is the program sequence;
in UpdateProfile.aspx
String currentUser = Session["BMUser"].ToString();
Strin...
i am very new to asp.net. when someone presses a button on default.aspx, this takes a user to default2.aspx by response.direct. there are some local variables on default.aspx that i want to carry over to the next page. i want to know what their values are. for example if someone entered text in a textbox on the default.aspx i would like ...
I am trying to create command line command to do this.
I already deploy website using aspnet_compiler to local drive.
Now I am trying to copy these files to remote machine IIS:
is it possible to use aspnet_compiler to directly deploy on remote IIS
something like this
aspnet_compiler -v /Website1 -p c:\Projects\WebSite -f test.lala.com...
Hi!
I have a requirement to generate Excel-documents, for Excel XP and forward.
I also need to be able to export data from Excel-documents.
The requirements are:
This needs to be done on the server. No automation of Excel.
Sometimes rather large amount of data (~10 000 rows)
The Excel-documents should be based on a predefined document...
I have had several occasions recently to access a specific class several times over a relatively small time frame.
So I've been storing the value of the class in Session and trying to access it on page load, if it's not available creating a new instance and storing that in session.
So instead of constantly replicating the same code for...