asp.net

Divorcing ASP.NET & SQL SERVER what alternative do you suggest?

Hi, I have been developing in asp.net since its existence (also classic asp before that) and also I have been using SQL server as my back-end database. After serious consideration, I now want to change the language I use. Considering the OOP capabilities of the .NET platform, what other languages do you suggest that I start learning i...

Best way to store commonly used values

In my Webforms 3.5 application, I have a GridView of users that displays the last time they logged in. This value is stored in the Users table in UTC. When an Administrator views the grid, I want them to view it the time zone the Administrator has selected in their preferences (also stored in the Users table). I have this working prop...

Advatages to using virutalization for web development

It's one of those things I see a lot but never really think of. Do you think for the purpose of web application development (specifically ASP.NET WebForms/MVC). Do you think it's advantageous to do such a thing and if so, what kind of advantages come out of it? By virtualization I mean using products like Hyper-V to separate the serve...

Is there an advantage in choosing ASP.Net over PHP or Perl?

I found myself struggling with me every time I am asked, which language to prefer for a web-application. Most people dismiss the importance of a good architecture. That why a answer that architecture is more important than the language. Afterwards sometimes I sompare the advantadges. But that is always not about the language but im most ...

JSON Security

Hi, Do Pagemethods and Json have security risks?(I dont use cookies).Forexample i have a pagemethod and i am sending user id as a parameter but i dont want to show it to user.Can user get user id from pagemethod? ...

Dynamically create text inputs (ASP.net/C#)

I have an input field on my page where the user will type in the number of text inputs they want to create. The action for the button is: int num_flds = int.Parse(a_fld.Text); for (int i = 0; i < num_flds; i++) { TextBox tmp = new TextBox(); tmp.ID = "answer_box" + i; tmp.Width = Unit.Pixel(300); answer_inputs.Controls.A...

Access a control inside a the LayoutTemplate of a ListView

How do I access a Control in the LayoutTemplate of a ListView control? I need to get to litControlTitle and set it's Text attribute. <asp:ListView ID="lv" runat="server"> <LayoutTemplate> <asp:Literal ID="litControlTitle" runat="server" /> <asp:PlaceHolder ID="itemPlaceHolder" runat="server" /> </LayoutTemplate> <ItemTemp...

Adding SSL on a single Page in ASP.NET

Hello, I want 'only' my Login page to be SSL enabled. When the user logsin using https://mysite.login.aspx, after the login the user should be taken to an http://mysite.default.aspx Please tell me step by step how to do it. ...

IIS7 Overrides customErrors when setting Response.StatusCode?

Having a weird problem here. Everybody knows that if you use web.config's customErrors section to make a custom error page, that you should set your Response.StatusCode to whatever is appropriate. For example, if I make a custom 404 page and name it 404.aspx, I could put <% Response.StatusCode = 404 %> in the contents in order to make it...

MVC Model: submitting multiple objects to the View

im not sure if there is a difference in these two methods. If so, which would be considered the better practice when submitting more than one object to the View. 1- Having the controller make separate calls to the datalayer for each object model and then wrapping the objects in a model to send to view. 2- Defining a "presentation" mode...

displaying an image from a bitmap variable using codebehind

I wish to create a very simple web app that simply displays an Image(s) from a database based upon either a date (from a calendar click event) or from a keyword search, getting the image(s) is no problem but I don't know how to display the resulting image. Preferably I would like to display the image in a table or grid or whatever, adjac...

robots.txt in ASP.NET MVC app returning 404

I've deployed an ASP.NET MVC site with a robots.txt file in the root but when I try and access this url it's returning 404. I have an .xml and a .html file in the root as well and they return valid content. I'm running this on IIS 6. I've tried adding .txt as "text/plain" to the MIME Types but no luck. Suggestions? ...

asp.net mvc - How i convert local file path string to http url

After saved upload file, i got local url of this file, how i convert it to http url? ...

handling Application_Error in ASP.NET app's global.asax

I wish to send mail to an administrator when the application crashes. So I simply do this in global.asax: void Application_error(object sender, EventArgs e) { SendMessageToAdministarator(Server.GetLastError().ToString()); } But actually many times Application_Error is called even though the application won't crash. And I wish to s...

ASP.NET: FileUpload control failing with long filenames

One of our clients is breaking the software in every way imaginable, and he's just discovered this one. If the user tries to upload a file with a very long filename (I think the user is trying with a 180 character filename), the FileUpload control refuses to recognise it on IE7. Click on the Browse button, browse to the file, click on ...

Printing from web applications

How do you generate paper-prints from a web application? Specifically I am thinking about more complex paper documents like diplomas, invoices and contracts. Variable number of pages with frames, tables, logos and headers/footers. Today I use custom forms and CSS for certain things and iTextSharp for others (I work with asp.net and MS-...

ASP.NET AJAX WebForms custom error handling question

I've made a web application that has the following architecture: Every form is a UserControl, there is just one actual page (Default.aspx), and a parameter in the URL specifies which UserControl to load. The UserControl is loaded in an UpdatePanel so that it can enjoy full AJAX-iness. There is also an elaborate message displaying mechan...

Choosing adequate spec servers for ASP.NET application

Hi, I'm working on an application that's due to launch soon and could do with some advice on how to go about choosing servers of the appropriate configuration so everything performs well. The app is .NET 3.5, using SQL express edition for the DB. We currently have one low spec server being used as a staging environment for testing, it'...

Lucene.Net and incubation status

Hi, I'm evaluating options to make our search more powerful on our .Net website. I need to look into whether we purchase software/hardware such as the Google Search Appliance (GSA) or develop the solution using a framework such as Lucene.Net We're a startup, and the GSA provides a lot of good functionality out of the box, but we would...

A Class File which parses csv and returns a dataSet as a result ASP.Net

I need a CSVParser class file A Class File which parses csv and returns a dataSet as a result ASP.Net ...