ASP.Net Tips Archives - Page 3 of 7 - All Things DotNetAll Things DotNet
  • Subscribe to this RSS feed
  • Receive updates as soon as they are posted.

ASP.Net Tips Category

August 21 , 2012 | | In: ASP.Net Tips

Center a Gridview on a Page

When you are creating a GridView on an ASP.Net page, one of the things you might try is to put a div tag around it, in order to center the GridView on the page, by assigning text-align:center to the div tag, but that won’t work. Newer CSS doesn’t work that way. Keep in mind, when […]

August 13 , 2012 | | In: ASP.Net, ASP.Net Tips

Change Text on ASP.Net Label with Javascript

Normally, if you need to change the text on an ASP.Net label, you would be doing it in your chosen language, being server side. But there are times when you are doing some functions in Javascript in which you need to change the text on an ASP.Net Label control using Javascript. It’s not as straightforward […]

I looked quite a bit on the net to try to find a solution do do this, and most of what I came across didn’t work for some reason or another. It can get a little tricky to get the SelectedItem from an ASP.Net RadioButtonList in Javascript, but hopefully, this explanation of how it works, […]

With a list type control (DropDownList/RadioButtonList, etc.) – you can dynamically select items in the list with a sort of ‘built-in’ find routine. For instance, if you are retrieving an item from a database, and you want to select that item in your list type control, this is the way to do it.

When you’re working with creating and checking cookies, you need to delete the cookies during your testing process. It’s not easily evident where to find the cookies on a Win 7 computer.

When using Template Fields in controls like the DetailsView, or the Gridview, for the ItemTemplateField, if the Line Breaks you entered into the database are not showing, it’s a fairly simple fix.

July 12 , 2012 | | In: ASP.Net, ASP.Net Tips

Bind vs Eval

The difference between the two items in the subject (when used to retrieve data from a datasource), depends on what you want to do with the items. Examples are as follows: Text='<%# Bind(“FirstName”) %>’ Text='<%# Eval(“FirstName”) %>’

In IIS 6, for me, at least, it was very easy to change or assign the Application Pool for my ASP.Net application, but in IIS7, it’s a little klunky, to say the least (IMHO). So, here’s a run-down of how to do it.

In case you need to find out (in IIS7) the version of ASP.net which your website is running, it’s very simple. Open IIS (Start/Administrative Tools/Internet Information Services Manager). Double click on the server to open the node. Next, double click on ‘Application Pools’. This will give you a list of the Application Pools of websites […]

When you get this error message, it’s basically a warning that what you are trying to insert into the database could be malicious, so it was blocked. This is the default for ASP.Net.



All Things DotNet Discussed – Winforms/ASP.Net/SharePoint/WPF


If you find this site helpful,
please donate to help keep it online and free





Code 'n' Sprox   DreamTemplate - Web Templates

Follow us on Twitter

Follow AllThingsDotNet on Twitter


Test - The Name: 6936