asp.net-2.0

What is the use of the `CodeFile` attribute in an ASP.NET page

What is the use of the CodeFile attribute in an ASP.NET page ? ...

jQuery replacement for Default Button or Link

As everyone knows, that default button doesn't work in FF, only IE. I've tried to put in the tag or in the and it's not working. I've found a js script to fix this issue, but for some reason it's not working for me. This script for a submit button, i need to use it for a LinkButton, which is should be the same. Link: <div id="pnl">...

Error running ASP.NET MVC on IIS 7

Hi, I have been trying to deploy my asp.net mvc site to IIS 7 and having a bit of an issue. Whenever I run the site, I get a "Could not load type 'System.Web.Mvc.ViewPage'.". When I try to access a page with a master page, I get a Could not load type 'System.Web.Mvc.MasterViewPage'" error. I tried using tracing rules in IIS 7 to narro...

Does ASP.NET use sockets to connect clients to each worker process?

I ask because I had heard that Microsoft may have implemented an optimized kernel level driver for handling HTTP traffic that then ushers it off to various worker processes through IPC and non socket mechanism. Is this true and if so is there any information on how this works. I'm asking in general for IIS6 and IIS7. ...

Custom Validator with an OR Condition

Hi all, Right now i have an asp.net 2.0 app which allows a user to search by the following fields Location (Required if there is nothing in idnumber field) Address (Required if there is nothing in idnumber field) Zip (Required if there is nothing in idnumber field) **OR** IDNumber. (Required if there is nothing in any of the ot...

How to read parameter passed from asp.net page, using C#?

Hi, I'm new to ASP.net, how can I read parameters passed from ASP.net page (http://website.com/index.aspx?id=12&amp;nam=eee) I develop this in C#. Any small example will be appreaciated, just something for me to start from. Thanks, ...

Returning a value on exception

Why does this code not compile? It gives me the error: not all code paths return a value Code: public bool isUserProfileHashed(string username) { bool isHashed = false; MembershipUser u = null; u = Membership.GetUser(username); if (u != null) { try { u.GetPassword(); ...

When should we write static function in asp.net class

I am having asp.net page where i have combo box . I am highly confused that how to fill that combo because i am having two approach Fetch combobox data : by creating object of my database class. and call function for combobox data. Fetch combobox data : using static function When should we create static function and how can we decide...

Three asp.net question

Hello everybody. All my questions in this topic related to asp.net 2.0 While working on some old project when i first opened it Visual studio asked me if i want to convert project from asp.net 2.0 to asp.net 3.5. Is it safe to chose yes ? If i chosen no in the previous question, how can i later still convert it to asp.net 3.5 ? (Visual...

Where should I put my JavaScript - page or external file?

In VS 2008, I have an ASP.NET content page having one master page. I would like to add JavaScript functions for client side validation etc. for this page. My questions are: Should I write these scripts in a separate .js file, or embedded within the .aspx file. Does this choice affect the performance of the website? Are there any rules...

How can we solve concurrency in asp.net

In asp.net web site, We have enry form which can be accessible to administrator. There are more then one administrator for entry. If all admin open form simultaneous and select some combobox value from form then how can we maintained concurrency Because once first admin select value from combox and save then that value should remove fr...

How to set the .webpart file to load UserControl from physical path?

In asp.net we can generate a webpart component by using WebPartManager.importWebPart(reader,err) function. And the xml configuration file(.webpart file) likes: <webParts> <webPart xmlns="http://schemas.microsoft.com/WebPart/v3"&gt; <metaData> <type src="~/webpart/wp.ascx"/> </metaData> ... In here, does the src parameter must be v...

Search Form in asp.net MVC

I have an admin site in ASP.NET 2.0 which I want to convert to ASP.NET MVC. I created a DB assembly in C#/LINQ which will get me all the DB information. Now getting to the UI, my current site allows users to specify multiple criteria, like city, order date, ship date, product name, product id, sku, upc, etc. As ASP.NET MVC is a differe...

Learning ASP.net - big difference from 2.0 to 3.5?

I've got a solid book on learning ASP.net 2.0 with VB & C# - my concern is whether I should push forward with this or pick up the newest edition which covers ASP.net 3.5. Basically, I'm writing a contact-management style web app for my church, and I really want to use ASP.net. I'm willing to invest in the 3.5 book, if it's going to b...

Best practices to generate schema for production with NHibernate

I am now ready to use NHibernate to persist my data layer access. I used DDD until that point and I use fake for unit tests and for the test site. I know that I can use SchemaExport for unit/integration tests of my NHibernate concrete repositories but how should I generate the schema to be used for the test site ? Should I create a spe...

Filtering DataView with multiple columns

Hi, In my application I am using a dataview for having the filters to be applied where the filter options are passed dynamically.if there are 2 filter parameters then the dataview should be filtered for parameter1 and then by parameter two. I am using a method which is called in a for loop where I am setting the count to the total no.of...

Forms authentication in ASP.NET 2.0

Hi, I am using Forms authentication in one of my web application. Following are the code i am using in a. Web.config forms loginurl="***" defaulturl="***" b. Login.aspx OnAuthenticate(object sender, AuthenticateEventArgs e) { e. Authenticated = validateuser(Login1.UserName, Login1.Password) if (e.Authenticated =true) { // ...

ASP.NET2.0 FormsAuthentication.RedirectFromLoginPage()

Hi i am using ASP.NET 2.0 form authentication. Also i am using Login Web server control in aspx page. My question is that , Is it necessary to write FormsAuthentication.RedirectFromLoginPage() method when we are using "Login Web server control " because i think it automatically create authentication cookie when we are using login con...

FileUpload1.PostedFile.FileName is throwing exception

Hi, I am using ASP.NET to read the data in the excel file. I am using a file upload control to read the file. I am able to read the data from the file in my local machine, but after deploying my code in the server, when I try to read the file from the client machine, I am getting an exception. FileUpload1.PostedFile.FileName is throw...

Multilingual website

Hi, I would like to have home page of my website in the language of client. Because site is hosted at one location but it can be access through any n number of country. So i want to have home page in the language of requested client browser. There is also one important point, i.e. suppose if client language is not supported at server th...