asp.net-2.0

Static methods in a class - okay in this situation?

Hey all - I have an app where I'm authenticating the user. They pass username and password. I pass the username and password to a class that has a static method. For example it'm calling a method with the signature below: public class Security { public static bool Security.Member_Authenticate (string username, string password) { //do ...

ASP.NET 2.0 "BC2017: could not find library" - How to force .NET to look for correct version?

A precompiled ASP.NET 2.0 (Visual Studio 2005) application is throwing this error when we try to access it. Compiler Error Message: BC2017: could not find library 'C:\WINDOWS\assembly\GAC_MSIL\System.Web.Mobile\2.0.0.0__b03f5f7f11d50a3a\System.Web.Mobile.dll' Two immediate problems spring to mind: We're running .NET version 2.0.5...

Good Book/Training Material To Learn ASP.NET 2.0+

Hello all can you suggest a book/s or training material (APPDEV, LearnKey etc.) that is very thorough in learning ASP.NET 2.0 and better? I am going to start the SAMS ASP.NET Unleashed Book since a know of a few training classes that uses this book as a textbook. Let me know of that book/site/training material that really helped you in...

Accessing ASP.NET 2.0 web services from Silverlight 2.0

I have some ASP.NET 2.0 web services and I have a Silverlight control that accesses these services. When I run these under the localhost, everything works fine. However, if I deploy the web services to an ASP.NET server and run my simple Silverlight html host locally, Silverlight no longer gets a response from the asynchronous web servic...

Updating a gridview based on dundas chart callback

I have a dundas pie chart which when clicked issues a client callback which updates another chart associated with it. Basically its like a drill down thing. I also want to update my gridview based on the user's selection of the pie. But since the update of chart is being done using dundas client callback I'm unable to rebind my Gridview....

how to reload the parent page from popup window without deleting control values

i have created two aspx pages, parent and popup page.I want to refresh parent page after some operation in popup is completed.I am using the Page.RegisterStartupscript Option for the reloading the parent page but if i call some server event from parent page that also repeat twice..i dont need that...i tried out each soln what i can do .....

Converting from VS 2008 Web Site to Web Application Project

I am in the process of converting a VS 2008 Web Site to a Web Application Project. I have followed the instructions on the MSDN site but am now getting a whole bunch of weird errors. I should mention that I did this for another project about a week ago and didn't have any issues. The error I am getting is this: The type 'XXX' already...

Using ASP.NET Forms Authentication, how do I get an image to appear on the login screen?

I am doing simple forms authentication for a small ASP.NET (3.5, C#) application and setting up my usernames and passwords in the web.config. I would like to apply the default stylesheet and include the header graphic (included on every other page) but the graphic and stylesheet won't apply, presumably because the anonymous user doesn't...

Can I set Session timeout for a specified Session variable differently than other Session Variables

I'd like to set the timeout on a specific Session Variable in a .Net web application, but leave other Session variables alone. Is this possible? Example: I have 5 Session Variables Session(var1) Session(var2) Session(var3) Session(var4) Session(var5) I want to set it so that Session(var1) through Session(var4) have a timeout of 8 hou...

Do you know any open-source asp.net web control to render code?

I'm looking for an asp.net control capable of formatting code written in certain programming languages (as in StackOverflow or the "Language" functionality in Notepad++), with automatic syntax highlighting/indentation depending on the language. Do you know of any such control? ...

Hide authorized menu item in asp.net web.sitemap

I have a web.sitemap with security trimming enabled, however I need to hide a menu item based on a role to a page that has no access rules in the web.config. i.e I have a Campaign page that is used to view existing campaigns as well as to add new campaigns, but I want the "New Campaigns" menu item to be hidden for anonymous users. I tri...

How to get all items under Site Actions-->Site Settings navigation using asp.net c#

Hi, I need to change navigateUrl of 'people and group' in sharepoint.In order to do this I need to retrieve the list of items from Site Actions-->Site Settings.I do not know which class to use for this.Please help me ...

How can I use CompareValidator for times without dates?

When I enter 9:00 into the Start control, and 16:00 into Finish; the code below fails validation. Does anybody know a way I can use the ASP.NET validator for times without the dates? Start <asp:TextBox ID="txtStart" runat="server" /> (hh:mm) <br /> Finish <asp:TextBox ID="txtFinish" runat="server" /> (hh:mm) <br /> <asp:CompareValidato...

Is there any server side event triggered when DetailsView cancelButton is clicked?

When in Insert Mode or Edit Mode of DetailsView, the default behavior of click CancelButton is clear inputs in TextBox. But I just want to redirect to other pages instead of clear inputs. I hope there is server side event triggered so I can Response.Redirect. Client side (some JS?) redirect is fine too. ...

Whats the quickest way to dedupe a querystring in C# (ASP.net)

I have an issue whereby the company uses a business tracking system that captures a users first visit and redirects them to the page they were trying to visit but with a refferer URL attached... Now as the referer URL carries the url that the person was trying to visit (dont ask why, Ive no idea) it causes me to have a duplicate of every...

How to trim datetime string to its minute in GridView?

I have bound fields in GridView to some dateTime property of data objects. The fields are displayed to the seconds level. It looks like 2009-2-3 18:00:00 PM. I just want it displayed to the minutes. E.g 2009-2-3 18:00. What is the best way to do this? Edit: I find use DataFormatString="{0:g}" is fine for me. The format is 2009-2-3...

SQL Server 2005 Reporting Services - Pros and Cons

I am developing a web application using ASP .NET 2.0, VS 2008 and SQL Server 2005. I would like to Use SSRS 2005 for the various reports I need to build for this web application. I would like to convince the team that we should adopt SSRS as the main reporting platform for most internal and external web applications we have. What are t...

ASP.NET "Reference required to assembly" error.

I have an ASP.NET page A that uses a data layer assembly DAL. I reference the DAL assembly with a <%@ Assembly Name="NGC.DAL" %> tag since there is no project to add the reference to. The assembly itself I copied to the pages' bin folder. The assembly DAL is a project that references System and System.Data. Now when A calls a method in...

asp.net 2.0 global themes not working on new windows server 2008

We're migrating our .net 2.0 websites from a Windows 2003 server (32 bit) with IIS6 to a Windows Server 2008 (64 bit) box with IIS7. I can't seem to get the global themes to work. Same content/directory structure as our old servers; local App_Themes work fine. Global Theme path: D:\Inetpub\wwwroot\aspnet_client\system_web\2_0_50727\The...

How do you simulate frequent database activity for realistic testing?

I'm building a web app against a database where a small number of records (about 5000) are active at the same time. Each active working record probably experiences 50-300 changes by 30 users over a 4 hour period ... which is thousands of changes per minute. Because our testing environment is so static, testing is not realistic, and som...