asp.net

Recommendations for Enterprise Architecture books

I've been looking at a couple of book around architecture for .net: Microsoft® .NET: Architecting Applications for the Enterprise - Dino Esposito ASP.Net 3.5 Application Architecture and Design - Vivek Thakur Are these worthwhile, or are better resources to be found on-line? Does the patterns & practices Application Architecture Guid...

Using ASP.NET in browsers that not support javascript.

Is there a way to use ASP.NET in browsers that javascript is not enabled? Whereas all buttons/actions do a postback using javascript by default, i guess that isn't possible, but using ASP.NET MVC could be a solution? What do you think is the best way to deal if the user's browser is with javascript disabled? Block the page access telli...

Loading Nested UserControls in ASP.NET

I've got an issue with nested controls not loading properly. I've tried various page methods and nothing seems to work. EDIT: The site compiles and runs fine--it just leaves a blank screen though. Basically I have a wrapper control for a Chart that allows me to select data, bind, and customize the chart with a lot of abstraction. I n...

Is there any way to do Image Quantization safely and with no Marshalling?

I'm currently using Brendan Tompkins ImageQuantization dll. http://codebetter.com/blogs/brendan.tompkins/archive/2007/06/14/gif-image-color-quantizer-now-with-safe-goodness.aspx But it doesn't run in medium trust in asp.net. Does anyone know of a Image Quantization library that does run in medium trust? Update I don't care if the solu...

Using an IEnumerable<T> as a delegate return type

I'm trying to define a delegate function that will return an IEnumerable. I'm having a couple issues - I think I'm close, but need some help getting there... I can define my delegate fine: public delegate IEnumerable<T> GetGridDataSource<T>(); Now how do use it? // I'm sure this causes an error of some sort public void someMethod...

Contact form in SiteFinity C#

Hi There, I want to do basic functionality with a simple contact form and on submit the form emails to someone. This is quite easy to do in asp.net, however I am having trouble once I upload it as a user control. Do you have a good example I can look at? Thank you! ...

string replacement in page created from template

I've got some aspx pages being created by the user from a template. Included is some string replacement (anyting with ${fieldname}), so a portion of the template looks like this: <% string title = @"${title}"; %> <title><%=HttpUtility.HtmlEncode(title) %></title> When an aspx file is created from this template, the ${title} gets r...

Setting a generic delegate to a class-level variable

I bumped into an additional question that I needed in regards to this: http://stackoverflow.com/questions/1099729/using-an-ienumerablet-as-a-delegate-return-type From the above solution, the following was suggested: class Example { //the delegate declaration public delegate IEnumerable<T> GetGridDataSource<T>(); //the gene...

Member '<method>' cannot be accessed with an instance reference

Hi, I am getting into C# and I am having this issue: namespace MyDataLayer { namespace Section1 { public class MyClass { public class MyItem { public static string Property1{ get; set; } } public static MyItem GetItem() { ...

How to configure invariant culture in ASP.NET globalization?

I need to fix CurrentCulture as the invariant culture in an ASP.NET application. How can I do this? <configuration> <system.web> <globalization culture="???" /> ... ...

Repository pattern with .NET 1.1

What is a typical approach to using the repository pattern with .NET 1.1 (C#)? I'm looking for something along the lines of this Stack Overflow question, except that in .NET 1.1, I don't have generics, so I'm just looking to see if it's possible (I'm sure it is), and how it's typically done. ...

aspnet_compiler fails when using App_Browsers folder with Web Deployment Project

Hi When Compiling my Web Deployment Project which references a Asp.Net project with a App_Browsers folder I get the following compilation error: C:\Windows\Microsoft.NET\Framework\v2.0.50727\aspnet_compiler.exe -v /[PROJECTNAME].csproj -p "[FILEPATH]" -u -f -d .\TempBuildDir\ ASPNETCOMPILER : error ASPRUNTIME: Object reference not set...

ASP.NET: Trying to parse Google Base XML, can't access "g:" tags

My customer doesn't want a database but would prefer to update their data in an XML file. This is all well and good. However, they also want their items to be submitted to Google products. This complicates things a bit. I decided to attempt to just use the Google XML file for the database rather than create and maintain two separate file...

Editable multicolumn primary key with ASP.NET's GridView and SqlDataSource

I have a table TaskSchedule. It has a three-part primary key and two more values: IdTask PK IdPerson PK StartTime PK EndTime Remarks IdTask and IdPerson are also foreign keys. The idea is that you can write down which person worked on which task in which period of time. We suppose that those three stuff will be sufficient to specify u...

Why Repeaters in ASP.NET?

I'm a Ruby on Rails / PHP guy, and my company got me to work with ASP.NET. It's not too bad, I'm glad to learn a new language but since I started working with this technology everyone is bothering me about Repeaters. The thing is that I totally fail of seeing the point: what make using a repeater better than just displaying things in a ...

ASP .NET MVC Ajax link that gets executed onmouseover

In my ASP .NET MVC application i have a link that refreshes "the preview data box" after each click. I've done this using this code: <%= Ajax.ActionLink("delete", "DeleteItem", new AjaxOptions(){UpdateTargetId="casePreview"}) %> Now I would like to change the behaviour in such a way that the preview data box is refreshed each ...

GET vs. POST does it really really matter?

Ok, I know the difference in purpose. GET is to get some data. Make a request and get data back. POST should be used for CRUD operations other than read I believe. But when it comes down to it, does the server really care if it's receiving a GET vs. POST in the end? ...

DetailsView Preview mode ?

DetailsView1.DefaultMode = DetailsViewMode.Insert; After inserting how can i Preview Data before Submitting/Inserting data in the table? I know the code would be: DetailsView1.DefaultMode = DetailsViewMode.ReadOnly; Where do I put this code BEFORE submitting/inserting data in the table? ...

ASP.NET/XML/LINQ: Extract Attribute from Element

I have the following in an XML file: <entry> ... <link href="http://www.example.com/somelink" /> ... </entry> I want to extract the "href" attribute. I've been getting my list of elements like so: Dim productsDoc = XDocument.Parse(productXML.ToString()) Dim feed = From entry In productsDoc...<entry> Select entry For Each entry I...

How to pass custom value to asp.net control on aspx page?

I need to generate the following in ASP.NET page. What's the best, easiest way to do that? Simplified example. So to custom property I need to pass string which would include index (i) to the property of the control. I could do it from codebehind, but it would be simpler and easier if I could keep it in .aspx file. <table> <% for(...