asp.net

Does IIS / ASP.NET make use of TCP keepalive option? (this question is not about the HTTP Keep-Alive)

Does IIS / ASP.NET make use of TCP keepalive option? What are the config parameters that affect it's use? Please note that this question is not about the HTTP Keep-Alive option. ...

Formatting text in Crystal Reports

I need users to be able to enter text in a webform with some basic formatting options and then generate a report showing the formatted text. The support for HTML is horrible and entering a simple bulletlist doesn't even show properly in the report. Right now i'm using a textarea with tinyMCE but that's because i don't know what else to...

how can i decode this base64 code?

im sorry if this is a stupid question but i was curious, i have this code that translates into my name im wondering what hash function its using, i thought it was md5 this is my name: saleh and this is the code 9LjZ6QoOB1A%253d pleaaase help ...

Not-found="ignore" behaviour in Castle Activerecord

Is it possible to implement the 'not-found="ignore"' behaviour of NHibernate on a key mapping when using Castle Activerecord? I am using existing legacy Castle Activerecord classes within an ASP.Net web application to map to a legacy, read only, MSSQL database. I cannot alter the database in any way. The parent Product table has a rela...

what is life span for items stored in view state?

Yesterday I went on an interview where the panel asked me this question. ...

.NET image handler stripping filetype on download

I have created an ashx handler to render image thumbnails from images in a mysql database. If a file name is passed through querystring, the content disposition filename is set (when user clicks "save as..." the filename appears). The images appear properly and the filename appears when user selects "save as..." but the filetype is lis...

In an asp.net project, how can I submit javascript objects?

I have an array of javascript objects and I want to press a submit button and 'send' them much like I can access a textbox or listbox's members - ie. the page posts back and I can put some code in the button's submit method. Is there a way of doing this? Or do I have to put them into a control? ...

How to add EventHandler OnCommand for ImageButton programaticly?

I have code, where i add ImageButton to table programaticly and I need to assign event handler to this ImageButton. When I write ASP/HTML code, there is attribute OnCommand, but in C#, there is nothing like this. Just CommandName and CommandAttribute. ImageButton ib = new ImageButton { CommandName = "Edit", CommandArgument = id.ToString...

ASP.Net 4.0 App Builds Successfully But Has Errors (?)

I have an annoyance, not really a problem. In my ASP.Net 4.0 app, when I compile I get some errors of the type "Validation (CSS 2.1)". These fill up my Error List but yet the build still succeeds. So two questions: 1. Why does my build succeed if it lists errors? If it truly is a successful build, why are these errors reported as Wa...

Execute/Query against SQL Compact 4.0 in ASP.NET

I'm writing a small little utility MVC app and I need to have the ability to execute ad-hoc queries against my one-table SQL Compact 4.0 .sdf file for management (Web Matrix isn't working right for development, and it won't be available on the PC this will ultimately be running on). Using Entity Framework code-first, everything is worki...

Creating a customized "Yes / No" alert box in asp.net (javascript) - Part 2

I am trying to create a customized messagebox using javascript but not getting too far. string txtConfirmMessage = "On " + DateTime.Now + ", "; txtConfirmMessage = txtConfirmMessage + sUserID; txtConfirmMessage = txtConfirmMessage + " added this record. Do you want to continue? "; btnSubmit.OnClientClick = @"return confi...

Debugging ASP.Net MVC in local IIS on Server 2008 R2

I am having issues debugging locally within Visual Studio 2010 on Server 2008 R2 (x64) for a new ASP.Net MVC application. I am able to debug using the VS Development Server (Cassini) but when I change to use the Local IIS Web Server and Create Virtual Directory, I am unable to debug. I get the standard VS message: "Unable to start de...

Add stylesheet link to dynamically created page object

I'm creating a Page object and adding a control to it for printing purposes. The code works, however I can not find a way to add a stylesheet link to the header. In the code I pasted I'm trying to add a link to the header and then add the header control to the page, but this causes an error: Request is not available in this context S...

BackgroundCssClass not being applied with ModalpopupExtender

I am trying to create this webpage that shows a database with a "Master-Detail" type view. To do this I am following this tutorial http://mattberseth.com/blog/2008/04/masterdetail_with_the_gridview.html. The only difference is that I am not using ObjectDataSource, instead I am just using my SQL - DataBase. Here's the problem: When I c...

asp.net : need to see the difference between 2 web.config file

What is the fastest and safest way to download a tool and see the difference between the 2 web.config files? Does windows xp has a built in tool to do a visual Diff on 2 files? I am running Windows XP professional SP3 on my computer. Would downloading Windows XP Service Pack 2 Support Tools cause an issue? thanks ...

Stop site reusing session id on expiry

Hi people. I want to be able to log when a user ends their session on our application and record whether it was a sign out or a the session expired. I am using cookies.Add(new HttpCookie("ASP.NET_SessionId", "")); to set a new sessionId on sign out, but when the session expires, the sessionId is reused if the browser instance is no...

ASP.NET with NoSQL

Had gone through some NoSQL concepts and MongoDB & CouchDB articles. It seems they will give more scope to build scalable web applications. But need some clarity whether they will support the following features as SQL Server does? Whether it supports database mirroring? Is there any size limitation of NoSQL database? Is it better to ig...

Setting Href to a server path

How do I set Href to a file on a server (example: \myserver\test\a.txt) correctly? When I assign the path to Href, it adds the domain name in front (http://mydomain.com/myserver/test/a.txt) which is not the correct path. ...

pdb files appear in website publish folder

I have asp.net website which when published using build > publish website option in VS2010 and even when checking omit debug information option in website publish window,published folder still contains pdb files is there a way to avoid this behavior?. any help would be appreciated Thanks guys... ...

ASP.NET Get physical filepath from URL

Is there a way to get the physical filepath from an ASP.NET's URL? Scenerio: I have an app that is on two severs, but it will now be on lots more, and each server puts it in a different physical file path. Right now I'm doing this: //for server 1 if (Request.Url.GetLeftPart(UriPartial.Path).Contains(".com")) { Application["StoreFiles...