We are using custom VirtualPathProvider to serve files from ASP.NET-based web site. To serve static files, like images, css and scripts, we explicitly stated that StaticFileHandler should be used for files with this extension. Like this:
<add verb="GET" path="*.jpg" type="System.Web.StaticFileHandler"></add>
All of this seems logical ...
I have a fairly simple CRUD web application (C#/ASP.NET) that runs fine in Firefox, IE7, and Chrome. (I'm accessing and testing the application on our development server.)
When I connect to the dev site via a Pocket PC device and go through the exact same steps, I get an ODBC error. Unfortunately, when I step through the code (once agai...
Hi,
I am trying to find out what would be the best way to add logging to a Dynamic Data app?
I am using DD for an admin interface and I need to log all the actions the user makes.
I thought of adding things to the codebehind of the PageTemplates\ListDetails for example, but was wondering if there is a better way...
For data access I am...
I am implementing a Repeater in my web application to display data. I want to add functional action links in a column similar to the built-in functionality in a GridView. Can anybody give me the steps required? I assume I will add a LinkButton control to each row, somehow set the OnClick event handler to point to the same method, and ...
I have a class, Order, which I persist to a database using NHibernate. There is a folder futher down in the web application that contains an object that inherits from Order, for our purposes, we can call it CustomOrder. I use CustomOrder to place a few properties onto the Order object for UI purposes. The properties don't actually hav...
I'm writing a custom memberhsip provider based on the source for the SQL provider and I tried first making the SQL Provider a separate project. Yet, the web app wouldn't recognize it unless I put all the source in an APP_Code folder in my web app.
Is this how you implement a custom provider? I thought I could simply reference the provid...
I'd like to get up to speed on web services--
I've found that I really like the video format; I tend to skim when I'm reading (bad habit) and I generally don't get the full value out of the video. I would like to see any kind of good resource that you can recommend though; the best thing to do is to collect the best resources.
...
I am working on a web based application that will need to store usernames and passwords. Account information will be needed to perform secondary authentication on behalf of users so I can't simply store usernames and passwords using one-way hashing with salt etc.
Assuming that my basic requirement can't change, any suggestions on how to...
I'm using the membership and role provider code from the Microsoft SQLProvider and SQLRoleProvider samples, and I'm getting a little overwhelmed with exactly how I can integrate my own schema into the source.
The GetAllUsers method, for example, loads data from specific tables in the ASP.NET database and puts them into a very specific d...
Can anyone point me to some sample code in C# for converting an html table to image? I know how to convert text to image but i need to create an image of well formatted text. The whole text is formatted in html table.
...
I am watching the ASP.NET learn videos on asp.net/learn. In this tutorial, they are building a quiz engine. At one point, the narrator explains that we are going to use the Session object to maintain the state between each page (each page contains a question and four answers). He says that "since this is a low traffic website" it is o...
Hello friends.
On a site I run, I have 404's and 500 errors mapped to redirect to a custom error page for end users; using the following code in my web.config:
...
...
<system.web>
<customErrors defaultRedirect="/404/default.aspx" mode="RemoteOnly">
<error statusCode="404" redirect="/404/default.aspx" />
</customErrors>
...
I have a FindControl in OnLoad event to find my button on page i.e.:
protected override void OnLoad(EventArgs e)
{
DataBind();
control button = Page.FindControl("myButton");
}
on my aspx page I have
<asp:Button runat="server" ID="myButton" />
If I only have this, everything works, when I pass in the OnLoad, button is not n...
My question is simple (although the answer will most likely not be): I'm trying to decide how to implement a server side upload handler in C# / ASP.NET.
I've used both HttpModules (IHttpModule interface) and HttpHandlers (IHttpHandler interface) and it occurs to me that I could implement this using either mechanism. It also occurs t...
My understand of Control Adapters is that they're designed to allow different HTML rendering for different browsers (thus, you register them in the .browsers file...).
However, it appears people are just registering adapters for the default browser and are using them to generally override the Render method of ASP.Net controls.
Do you b...
What's the best way to prevent a user from making duplicate credit card transactions? Be it by clicking the submit button too many times, or by navigating back from the receipt page and clicking the submit button again.
...
Hi I would like to do the following:
Use JavaScript to stop the update panel from "updating" when the browser is inactive, and restart once it’s active again. I was looking at: Inacivity with JavaScript. I was hoping that I could use this to accomplish what I want; can someone point me in the right direction? Thank you very much!
[ED...
I'm trying to fix this ugly code.
RadGrid gv = (RadGrid) (((Control) e.CommandSource).Parent.Parent.Parent.Parent.Parent);
I often need to find the first grid that is the parent of the parent of... etc of a object that just raised an event.
The above tends to break when the layout changes and the number of .Parents increase or decrea...
I'm attempting to start using DynamicData functionality in a previously existing website. Basically I'm following this tutorial. When I got to the part about creating the Field Templates I decided I could probably create a new site with the Dynamic Data stuff built in, and then just copy the folder over.
Unfortunately when I do that a...
I'm swimming in the relationships and hierarchies of a web application that I'm trying to secure with custom sql membership and role providers. I'm a little fuzzy on forms authentication, principals, and the like. So --
The web.config is set up for forms authentication with a custom membership provider and custom roles provider.
When ...