asp.net

ASP.Net web site on IIS connecting to Access DB with Links to SharePoint lists on another machine

Dear All, My Problem is the following, I have an ASP.Net web site hosted on IIS. This web site connects to an Access 2007 DB file on the same server. The DB file contains links to sharepoint lists on another server on the same domain. If I run the web site on the visual studio built-in server, I can Open connection to the DB file and ...

ASP.NET Roles and Profiles: best way to query for collection of users who match custom profile property?

ASP.NET 2.0 membership, roles, and profiles is the cat's meow. The API for roles supports handy methods like GetAllUsersInRole("MyNewsletterSubscriber"), which will return a collection of people in the "MyNewsletterSubscriber" role. I am wondering what the best way to return a collection of people with custom ASP.NET Profile propertie...

How can I convert String to Int?

I have TextBoxD1.Text and I want to convert it to 'int' to store it in a database. How can I do this? ...

Entity framework primary keys in Views

I have to use a View with the EF but, when e import it, the primary key of the view is displayed incorrectly and for some reason I can't change it. ...

ASP.NET Verses Winforms

Anyone know where i can find a good comparison between the "generally accepted" Pro's and Con's for developing in ASP.NET verses Win forms 2.0. Preferably something official. I need to make a presentation to my boss (not a techie at all) about the two, and am looking for something "official" to show him. I have found lots of things o...

How to trace ScriptService WebService requests?

I have a SoapExtension that is intended to log all SOAP requests and responses. It works just fine for calls from an application using the MS Soap Toolkit (OnBase Workflow). But it doesn't work for calls made by $.ajax() on an html page. Here's an example: $.ajax({ type: "POST", url: url, data: data, contentType: "app...

How to use dates in x axis with google chart api

Is there a way to plot a chart with google chart api so that the X-axis values are days in a month? I have data points that are not provided with the same frecuency. For example: Date - Value 1/1/2009 - 100 1/5/2009 - 150 1/6/2009 - 165 1/13/2009 - 200 1/20/2009 - 350 1/30/2009 - 500 I want to make a chart that will separate each data...

Setting focus on top of the page on click of asp.net link button

I've a asp.net datagrid which shows customer order details. Pagination at the bottom of the grid is done using datalist and asp.net Linkbutton controls. Here is the code: <asp:DataList ID="DataList2" runat="server" CellPadding="1" CellSpacing="1" OnItemCommand="DataList2_ItemCommand" OnItemDataBo...

Foolproof way to control row height in an asp:GridView?

I cannot seem to stop my gridview rows from being too tall....from googling, it seems like this is an incredibly common problem, but I just can't seem to resolve it. <GridView ID="gridComputerApps" DataSourceID="llbComputerApplication" runat="server" AutoGenerateColumns="False" CellPadding="0" CellSpacing="0" style="overflo...

Using log4net with ASP.NET to track Session variables

Our web app captures a user's login and stores it in a session variable, similar to Session("User_Id"). I'd like to use log4net to capture the User in the log. I see a few references to using the MDC (Mapped Diagnostic Context) has been replaced with ThreadContext properties. Has anyone implemented this ThreadContext approach? An...

ASP.NET winforms-like philosophy and page lifecycle often get in my way

MVC + classic webforms in the same website Now I am wondering if it was possible to mix MVC and classic webforms (I don't want to reimplement what I've already done even if this makes the code non-homogeneous...) Original question The more I improve my understanding of ASP.NET (and web programming in general) the more I dislike ASP.N...

Finding the .Net framework

Hi, Is there a way to find out which .Net version i.e. 1.1 or 2.0 or 3.0 etc.. was used to create a web project. I have files like .aspx, .aspx.vb, web.config etc but need to figure that out. Also how to open the existing ASP.Net project in Visual Studio environment. I have received files from another person but for security reasons he...

Why does Request.Cookies return string instead of HttpCookie object in foreach loop?

Hi, This morning I accidentally saw the following snippet code, I was fairly surprised because it work very well. Don't look at its logic please, I'm just curious why does the HttpCookieCollection (Request.Cookies in this case) return a string (cookie name) instead of a HttpCookie object in foreach loop. Is it a consistency issue becau...

file upload issue

Hello everyone, I will need client (end user) through browser to upload big files (e.g. similar to Youtube's scenario which uploads big video files), the file size should be no larger than 500M bytes. I am using ASP.Net + C# + VSTS + IIS 7.0 as my development platform. Any ideas or good practices about how to handle big file upload iss...

Brushing up a knowledge of C++, C#, ASP.NET and Design patterns

I've been a software developer for 10 years and came all the way from a wild world of assembly language programming, then server side of C++ and COM, and for the last 5 years I was comfortably settled in a quiet world of .NET, C# and development of business applications. The problem is - the last couple of years was so comfortable and I...

ASP.NET : Invoke codebehind method on Enter Key press in form

I have an asp.net form which has 3 text box and and a asp.net link button control.I want to invoke the button click event handler method when the user press enter key.I used asp.net panel and its default button property.Its working in IE.But not in other Browsers like firefox etc.. Is there any other method to do so ? ...

how to solve this convert type error?

How to solve this convert type error? Cannot implicitly convert type 'System.Collections.Generic.List' to 'System.Collections.Generic.List Error 2 Cannot implicitly convert type 'System.Collections.Generic.List<AnonymousType#1>' to 'System.Collections.Generic.List<Product>' D:\Fortune\App_Code\BL\StoreController.cs 2...

ASP.NET C# : Crop an image

Can any one tell me In ASP.NET C#, how can i do a cropping of an aimage saved in server.I want to remove 10 px from the left of my picture. Thanks in advance ...

Hiding/Unhiding Control in Gridview's column using javascript

In gridview's column i have a linkbutton and a label under it. I want to hide/unhide label when linkbutton is clicked. I want to use javascript because i don't want any postbacks. My java scripts function needs to receive the reference of label which corresponding to the linkbutton that was clicked. (then i will use document.getElement...

are there simple, open source learning-friendly web apps?

I was wondering if I could learn ASP.net or other web programming frameworks by studying existing functional open source apps of the simpler kind. As in, of not quite MediaWiki complexity and so forth. Perhaps something like "simple forum" or "simple web store". Something that is non-trivial and demonstrating useful functionality, but no...