asp.net

Textbox value doesn't get updated

I have a asp.net page with a datalist with a textbox and a button on it, on page load the textbox gets text in it, if I change the text and press the button the text doesn't get updated. What am I doing wrong? { protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { DataTable table = CategoryAccess.Ge...

Insert childnodes in to Treeview, independant of position or depth.

I'm looking for a way to be able to insert childnodes in to TreeNodes of a Treeview, no matter how deep or far. I was thinking of using a Dictionary for this, storing the pointers to each object, allowing me to find them if I need to store childnodes under them. I'm gonna start working on this, but my starting idea might be all wrong, ...

MSMQ Messages not arriving

Hi I have a Web App and a service sitting on the same machine and communicating via message queues. The problem I'm experiencing is that about half of the time the messages I send from the service are not arriving to the reading code in the web app. Some of them will arrive and some will not. The messages are sent with at least 1 second...

Who benefits (or is at a disadvantage) with MVC: the Developer or the Designer?

When comparing MVC to ASP.NET Forms, which one offers a better design-time experience for a web designer? ... which is better for the developer? I was just looking at the new Razor MVC syntax and think that designers may simply delete stray } that are used in for..each loops. One might say that ASP.NET WebForms offers a better web des...

What does the term Principal mean in .NET Security ?

I'm reading this article http://www.codeguru.com/Csharp/.NET/net_security/authentication/article.php/c7415/ I still don't understand the concept of "Principal" (why this name) what's difference with just Identity in common language ? For example in the tutorial I don't understand the distinction between UserIdentity and SecurityPrincip...

ASP.NET (MVC) Get username from URL http://[email protected]

Is there any way to retrieve username from this http://[email protected] type of address in ASP.NET MVC (optionally in ASP.NET) from current request? ...

WCF for web sites?

Hello community. I'm working For my company on a .NET N-tier architecture and have several questions. Basics: the project should be split into layers and should not allow tues develop as easy as possible additional modules for modules like logging, ratings, user management etc. Environment: VS2010, EF4, SQL Server 2008, LinqToSql, c# ...

How to index a web site.

I'm asking on behalf of somebody, so I don't have too many details. What options are available for indexing site content in an ASP.NET web site? I suspect SQL Server's Full Text index may be used if the page content is stored in the database. How would I index dynamic and static content if that content isn't stored in the DB, but in ...

ASP.NET as server app - questions before I'm getting into it

Earlier on I've implemented a custom C++ server from scratch, something which is nice and fun to do but is very time-consuming. So I've heard about "servlet" of Java which sounds like something I'm looking for for my next project. I'm looking at ASP.NET to be used as a servlet because it's pretty much mature in terms of networking capa...

Share application variable between 2 websites (IIS 7.5)

I have two urls that are supposed to lead to the same actual folder. I can't do a redirect because the websites are built so they question the URL and perform accordingly. So I built two application in the IIS (I tried using a virtual directory for one of them, but I kept crashing on the web.config can not be read). Everything works pe...

ASP.NET WebForms Placeholder for NVelocity View Engine

Is there any way to use placeholder similar to WebForms in NVelocity View Engine (.vm files)? Today I've got a component containing everything for the <head>, but I wish to specify additional tags from each view page like it can easily be done in ASP.NET WebForms / MVC: <asp:Content ID="Content2" ContentPlaceHolderID="head" runat="ser...

C# Less obscure way to populate a DetailsView?

I can't seem to bind a single GridView's row to a DetailsView properly. Currently I have this: using System; using System.Collections; using System.Collections.Generic; using System.Web.UI.WebControls; namespace WebApp { public partial class CrudGrid : System.Web.UI.UserControl { public const string EditCommand = "EditD...

In ASP.NET is it dangerous to get a URL via URL ?

It's possible to get a string via Request.QueryString.Get("url") but ASP.NET raises an exception: "A potentially dangerous Request.Path value was detected frfom the client". I'm not gonna trust this url for any purpose (for example just redirecting client to that url). Am I supposed to change my design or simply turn off the ASP.NET exce...

How to Background time/IO-consuming operations across a firewall in ASP.NET C#

Summary We have an ASP.NET application that allows users to query a SQL Server Database through a middle layer (pretty standard stuff). When the user attempts to generate a PDF for the rows that were returned to them. Each set of rows with a common identifier will "turn into" a separate page in the resulting PDF. Originally, I assumed t...

If an ASP.NET application uses many DLLs, what's the best approach for keeping configurations of every dll separate ?

After creating settings for each dll, a .dd.config file is generated. If that dll would be part of an asp.net application, how to keep this configurations separate for each dll and don't merge them into web.config ? ...

weird gridview problem in asp.net

Hello everyone - I have this weird gridview problem in .net, I haven't found what can be the issue so far. Here is what is it about: I have a stored procedure which is consumed by sqldatareader. Then I do have reader read all the values and display from the stored procedure. Problem is happening now. When I am entering some specific va...

Utility or opensource to implement Routing and Url-Rewritting in asp.net 3.5

Hello Experts, I need to implement Routing or Url-Rewriting in my application. So, is there any utility like logging utility Elmah. I dont want to write much code, I need to configure and start playing. Any help will be most appreciated. ...

Dynamically generated HTML in C# to be formatted

Hi there, I have an ASP.NET web forms site with a rather large menu. The HTML for the menu is dynamically generated via a method in the C# as a string. I.e., what is being returned is something like this: <ul><li><a href='default.aspx?param=1&anotherparam=2'>LINK</a></li></ul> Except it is a lot bigger, and the lists are nested up to...

File -> Open Website in MonoDevelop?

I cannot open an existing website in MonoDevelop. I have tried various options with no success. Is there any way to do this? Visual Studio has this and it works very well, but I'd like to try out MonoDevelop for my current project. ...