asp.net

Can this be down with sitemap trimming?

Hey Guys, It seems like this should work but it doesnt. Im logged in as a Power user and should see 1 report but I actually see 2. <siteMapNode url="Reports" title="Reports" description="" roles="Administrator, Power"> <siteMapNode url="default.aspx" title="Default" description="" roles="Administrator" /> <siteMapNode url="custo...

Any slick and clever ways to inject JQuery before the page begins rendering?

I'm looking to somehow get jQuery inserted into every page with the MINIMUM of code written... in other words I don't want to write <script language="javascript" src="PATH TO JQUERY"></script> on every single aspx page. So far I've thought of using a Base class and inserting a "Response.Write" into the "page load" event. Besides that, w...

How to Implement Password Resets?

I'm working on an application in ASP.NET, and was wondering specifically how I could implement a Password Reset function if I wanted to roll my own. Specifically, I have the following questions: What is a good way of generating a Unique ID that is hard to crack? Should there be a timer attached to it? If so, how long should it be? ...

ASP.NET Custom Error except 404 errors,

Hi I have setup custom error as follows.. protected void Application_Error(Object sender, EventArgs e) { Exception ex = HttpContext.Current.Server.GetLastError(); if (ex is HttpUnhandledException && ex.InnerException != null) ex = ex.InnerException; if (ex != null) { try { Logger.Log(LogEventType.U...

Should I use ASP.NET sessions or avoid them and why?

Should I use ASP.NET sessions or avoid them and why? ...

loading multiple files using Silverlight with asp.net

Hi All I have developed one project by using silverlight 2 with asp.net. I have one silverlight application and two .aspx pages (one for login.aspx and another for registration). I have designed login.aspx using silverlight 2 and I have attached .xap file to my login.aspx. For registration.aspx. I need to developed one more silverlig...

Can't get my custom controls to appear in intellisense

Hello, I have added my assembly and namespace to my project, but I cannot get intellisense to show my tag name in the ASP.NET markup. What am I missing? I have a project that is MyWebSite.Web. In my web.config I have: <controls> ... <add tagPrefix="MyTagName" namespace="Enhancements.Controls" assembly="Enhancemen...

Grid View, ASP.NET

Hi When pressed Once,i want to make the Grid view Button(Time In) invisible until the User press Time Out Button. Once the user press the Time Out Button,Time in Button must be shown ...

Generate a form from a poco object

Say you had a config object public class MyConfig{ public int PageSize{get;set;} public string Title{get;set;} } and you want to automatically generate a asp.net form to edit the properties on this object. Do you know of any frameworks to do this automagically? I know of MS Dynamic data, but seems I need to have the whole stack ...

How do I use single login for multiple web apps

I want to log in for 1 application and use the same login token to authenticate the second application. I have used the same application name so both applications use the same membership provider..... I have 2 web applications, using asp.net 3.5, c#, hosted in IIS 7.0. I use the aspnet_membership provider for authentication/authorizatio...

How do I make a ASP.NET MVC application multilingual?

How to do the multilingual application in ASp.NET MVC? ...

Catching "Maximum request length exceeded"

I'm writing an upload function, and have problems catching "System.Web.HttpException: Maximum request length exceeded" with files larger than the specified max size in httpRuntimein web.config (max size set to 5120). I'm using a simpled <input> for the file. The problem is that the exception is thrown before the upload button's click-ev...

Custom HttpHandlers and different handler types.

All literature I see on creating custom handlers deals with associating an extension with a handler, e.g. if I wanted a handler for Ajax requests, I could implement the IHttHandler interface in an AjaxHandler class. Now, to have individual instances of AjaxHandlers, e.g. DocAjaxHander, PersonAjaxHandler etc. how would I derive the base ...

how to bring drag and drop operations for controls in runtime?

Hi, For example i've developed a website which contains some controls like button,treeview,etc....Then how can i drag and drop those controls....while running that application.... ...

Excel Export In ASP.NET + VB.NET Bug

We use a small bit of excel exporting code in our app code at work to export XML controls from our ASP pages into an excel format using the following code: Public Shared Sub Export(ByRef xml As Xml, ByVal filename As String) Dim response As HttpResponse = HttpContext.Current.Response() response.Clear() response.AddHeader("...

Selecting a rows in the standard .net 2.0 GridView Using VB.net & JavaScript

Does anyone know how i can get the grid to select a row by clicking on any cell in the row? The only way i can do this at the moment is by setting the AutoGenerateSelectButton property to True, but this adds a column to the grid with a crude "select" hyperlink and only selects the row if the word "Select" is cliked on. Surely there ha...

ASP.NET: How to change the background color of a control that failed validation?

Let's take the following simple site as an example: <asp:TextBox id="TextBox1" runat="server"></asp:TextBox> &nbsp; <asp:RequiredFieldValidator id="RequiredFieldValidator1" runat="server" ErrorMessage="Required!" ControlToValidate="TextBox1"> </asp:RequiredFieldValidator> Now, I would want the TextBox1 to change its BackColor to ...

How to diable viewstate and other hidden fields in ASP.NET

I would like to remove these hidden fields in my ASP.NET pages. Alternatively change the names or make sure the server code ignores them. (I know I will loose some functionality, but I think it is better to handle it than removing 'runat=server'. The only thing I am worried about is Updatepanel, which i really need) (The above is...

How can I load a config file from different assembly in asp.net?

Hi I am using the Validation Application Block form the Enterprise Lib, and have my validation rules defined in a validation.config that is located in the same assembly as the entity objects (so I can use the same rules in both the backend and on the website). But how do I get the validation.config from the entity assembly into the web...

How to use Web parts in asp.net C# ?

How can i use web parts for performing drag and drops ? ...