asp.net

ASP.NET: Dealing with object types as parameters when updating in ObjectDataSource

How do you guys update let's say for example a FormView with an ObjectDataSource source. The DataObjectTypeName is a class which I have already marked with a DataObject attribute. Now, I want to customize the update process and add some custom data to the parameter. What do we need to do so? Example: I have a BLL class which let's call ...

Manually updating .Net's asp_Profile PropertyValueString settings through SQL?

Hi, I was wondering if anybody has an sql function/code to update property name values manually without using the .net API? Cheers Kevin ...

How to add code beside to ASP.NET MVC view in Visual Studio?

I want to use code beside files for my views in my ASP.NET MVC project. Is there any simple way in Visual Studion 2008 how to add a code beside file to the view? Note: I know that code besides files are no preferred in ASP.NET MVC but my reason is that I want to give .aspx files to designer and don't want to confuse him nonHTML code as ...

Which User Control event comes between data binding (other controls) and Render?

I'm currently building a user control that displays a message when a Repeater is empty. The idea is simple, provide the user control with the ID of the Repeater. When the user control is rendered look up the Repeater and check Items.Count. If it's zero then display the message. I would like to add one more feature though. I want to be ...

MembershipUser.ChangePassword fails without warning

If I call user.ChangePassword(oldpass,newpass), and the old password is wrong, or the new password does not meet the provider's complexity requirement , the method fails without warning. is there any way i can find out if there is an error and what the error was. I can always put these checks in my code, but there should be a way to do...

is it possible to disable the submit behaviour of a server side button using Javascript

Hi All, is it possible to disable the submit behaviour of a server side button using Javascript? Note: I dont want to disable the button, the user will click the button but it will not submit/get any value from server. scenario: <asp:Button ID="Button1" runat="server" Text="Submit" onclick="Button1_Click" OnClientClick="Check()" /> ...

How can I make downloadable file created by XmlDocument()

I have created a file with XmlDocument xmldoc = new XmlDocument(); Can I make this file as downloadable? without saving it? ...

Error Connecting to Undo Manager of Source File XYZ

I've been getting an error recently while debugging an ASP.NET application in Visual Studio 2008: 'Error connecting to undo manager of source file XYZ' Any idea how I can get rid of the error? ...

Windows Authentication and Forms Authentication together for ASP.NET

I am developing an internally-facing application that needs to automatically authenticate users via Windows Authentication and fall back to Forms authentication. The fall back would occur in situations where the user on a computer logged in as a group account (such as an operations center). I'm concerned about security where a user cou...

Best Practices for Building a Search App?

I will be starting a simple datastore-and-search project soon. Basically, one of those "put my huge Excel spreadsheet into a database, build a web GUI for it, and make it searchable" type-things. One thing that's been bugging me is the actual search logic that will be used when the user enters some criteria. I am imagining a search inte...

Project nearing completion. Time to begin testing. Which methods are feasible towards the end of the development cycle?

Let's assume one joins a project near the end of its development cycle. The project has been passed on across many teams and has been an overall free-for-all with no testing whatsoever taking place along the whole time. The other members on this team have no knowledge of testing (shame!) and unit testing each method seems infeasible at...

~/ equivalent in javascript

any smart way of doing a "root" based path referencing in javascript just the way we have ~/ in asp.net ? ...

Windows Service restarts on Exception

I'm building a windows service that grabs information from a website periodically How can I start looking again when a exception is caught? for example when internet goes down and up later. Code: public string cadena(string pagina) { try { String cadena; WebRequest myWebR...

Number of total select statement for particular web page?

I was wondering what is the easiest way to see total number of database queries from my ASP.Net (.NET 2.0) application. My application heavily use sql 2005 database because all data are dynamic and everything goes through one connection string in web.config. Connection pooling is enabled there. So, I am wondering how many select stat...

"Preview Area" in UpdatePanel not Refreshing

Greetings! I have a "code builder" page where users select various radio buttons and it generate HTML markup (mostly SCRIPT tags) that they can use on their page to display some data. There is also a "preview" area so they can see the results before they copy/paste the code in their site. The form exists in a FormView control and is w...

ASP.NET MVC Page Won't Load and says "The resource cannot be found"

I am having a problem where I try to open my ASP.NET MVC application but I get the ASP.NET error page which says this: **Server Error in '/' Application. The resource cannot be found. Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily un...

wcf: adding username to the message header is this secure?

I'm connecting to a WCF service in an ASP.NET app. I'm logging in using one username and password and passing the actual username of whoevever is logged into the ASP.NET web app in a message header as below. using (OperationContextScope scope = new OperationContextScope(myService2.InnerChannel)) { Guid myToken = Guid.NewGuid(); ...

What is the best way to remember tab selection with the .NET TabContainer?

This is what i am currently using to remember the state but wonder if there's a better way to do this? <script language="javascript" type="text/javascript"> function readCookie(name) { var nameEQ = name + "="; var ca = document.cookie.split(';'); for(var i=...

Programatically mimic CTRL+A in a DataGrid in ASP.NET?

The title says it all. I need to select an entire DataGrid like the keystroke CTRL+A. For example: instead of selecting the datagrid with the mouse, the user just clicks a button and the datagrid is selected. Is it possible? ...

How to render local time given UTC datetime values in ASP.Net without using Javascript?

Is it possible to display local times to users without using Javascript when you store the values as UTC? ...