asp.net

Best Free Controls for .NET

What Free Controls are there for .NET (both Winforms and Webforms)? ...

ASP.NET MVC Caching vary by controller action parameter

Is there any way I can vary caching by a controller action parameter using the outputcache attribute? We have varybyparam which will not work if my parameters are embedded within the url in a REST manner. Thanks ...

Actual pixel size of columns attribute for asp.net textbox

What is the exact pixel size of one column when I used the columns attribute to determine a width of an ASP.NET textbox control? <asp:TextBox id="MyTextBox" runat="server" columns="10" /> ...

Linq to SQL File Size

Hi, What I wanna learn is if we put every table into one LinqToSQL file, do we lose performance ? Is it better to put each table in different LinqToSQL Files or it's the same thing with putting in single one. I hope I could explain my question. Thanks and Regards... ...

ASP.NET Combo Box value seems to change when I disable it in Javascript

I have a form in which the user can choose a component type from a combo box, and depending on that component they they may or may not be able to choose a data type from another combo box. When the user selects a component type, client-side javascript fires on the change and sets the value of the data type combo box if required and disa...

ASP.NET MVC vs WebForms for First Page Load Speed for Big Projects

We have a pretty big ASP.NET WebForm (web application) project with a lot of references to other libraries, other projects etc and most of the time after a compilation, the first time we load a page it takes a LONG time before rendering anything... Disk IO is the main problem. For small projects it's nearly instantaneous, but once your...

HTML attribute bgcolor is deprecated: What To Use Instead?

VStudio ASP.NET gives the following message: Attribute 'bgcolor' is considered outdated. A newer construct is recommended. What is the recommended construct? bgcolor is within a <td> element. Another related message is : Attribute 'bordercolor' is not a valid attribute of element 'table'. Does anyone know where I might find th...

Populate TreeView from DataBase

Hi, I have a database table (named Topics) which includes these fields : topicId name parentId and by using them I wanna populate a TreeView in c#. How can I do that ? Thanks in advance... ...

Spam filter for ASP.NET?

I'm looking for a spam filter that I can integrate into my ASP.NET application. I don't want any delegate services (e.g. Akismet) as I'm doing this for a high traffic website, any suggestions? Edit: I mean a post spam filter, it's a forum based website. Edit: Thanks for your answer but I'm not looking for a Captcha, I'm looking for a s...

Magic with URL in asp.net - 3.5

This is my dilema: My web site done in asp.net 3.5. I have buttons which if the user clicks should show images. The images are located at a third party and accessible via web url. So my app has to login to this third party app and they will return a url to me which i should then do a response.redirect in my website and show the user ima...

Where do I place code that fires after the page is returned to the browser.

I want to send an Email message after a page is returned to the browser. Where do I place this send Email code so that it does not delay the page that is returned to the browser? ...

Is there any native way in ASP.NET to do a "success message"?

Say you have something like an ASP.NET ASP:DetailsView to show and edit a single record in a database. It's simple to record the error cases... you add validation and a validation summary. When your update form fails validation it naturally makes noise: it shows the validation message and/or the validation summary. Not a single code b...

Facebook Bookmark

Hi there How to post required text instead of meta description using Facebook bookmark ...

get SelectedRow of DataGrid under dropdown_SelectedIndexChanged Event ASP.Net,C#

I have a Template Column under which I have Placed a Dropdownlist. Now I would Like to get the selectedRow of the datagrid on selectedIndeChanged event of the dropdownlist that's inside the template Column ...

Render Excel File

Hi, I am actually rendering an excel file in the browser. I use the Response.Writefile(filePath) to dod this. It is working perfectly fine in few of the machines. I am getting a pop up with "Open","Save" and "Cancel" option. But incase of few machines after i do a save click on the popup a plain empty page remains open. This happens o...

How can I embed images in an ASP.NET Generated Word File

Hi everyone! I have a quite common problem, as I saw in the various user groups but could not find a suitable answer. What I want to do is generate an ASP.NET page in my website which will have the option of being exported into Microsoft Word .doc format. The method I have used is this: Response.Clear(); Response.AddHeader("content-d...

Can't get ViewState to work on production server.

I have an ASP.NET application developed on my Vista box (IIS7). It works fine until I deploy it to the product server (W2K3/IIS6). Once deployed, I get a consistent "Object reference not set to an instance of an object." when reading from my ViewState object that determines whether a button displays an "On" or "Off" image. The code for ...

How can I include SessionID in log files using log4net in ASP.NET?

Hi, I'm new to log4net, so hopefully this is a really easy question for someone?! I've got log4net working with the RollingLogFileAppender for my web application. I'm using logging to try and find where some performance issues are coming from. In order to do this, it'd be useful to include the ASP.NET SessionID in the log output so t...

How to do 301 redirects in asp.net from old Apache mod_rewrite style urls when moving a site from php to asp.net?

Hi I have an existing site in php running on Apache using the mod_rewrite plug-in. In other words, I currently have urls like www.example.com/section/subsection/ which Google and others have indexed. However, the site needs a major upgrade, and I would like to move it to asp.net. I only have the option of using a shared hosting solutio...

ASP.NET MVC - Current Action

I wanted to set a css class in my master page depending on the current controller and action. I can get to the current controller via ViewContext.Controller.GetType().Name, but how do I get the current action? (ie Index, Show etc) ...