Radiobuttonlist with a tooltip context from database
I came across this request and solved with a solution by adding listitems from code and add Titile attribute to the listitems for the tooltip content. (http://forums.asp.net/t/1487353.aspx) The forum...
View ArticleUse a Pipe delemited file in ASP.NET
It is very straightforward to use CSV delimted with comma or tab, since they are standard default setting in registry under this entry:HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Jet \ 4.0 \ Engines \...
View ArticleChange parameter name with datacontrol event without using ParameterPrefix
You can pass the original parameter value to your new parameter in your -ING event (here is DELETING) of your SqlDataSource. You can use the same logic to do update. <asp:SqlDataSource...
View ArticleCode sample: Use parameter with SqlDataAdapter
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Dim myPara As String = Request.QueryString("ThreadID") If...
View Article” hide a gridview column if all the row values for that column are null”
Here is a code snippet I posted before: Here is working sample from a previous thread: 1.Add these two events to the gridview OnRowCreated=”GridView1_OnRowCreated” OnDataBound=”GridView1_DataBound”...
View ArticleInject Javascript from ASP.NET page
There are a few ways to inject script to an ASP.NET page. Where to inject your script is depending on your need of the script on your page. I am listing three ways to do it for one of my recent task:...
View ArticleRegular Expression for a fixed length alphanumeric code in ASP.NET
A length of 7 literal starts with a(or A) with the third location with a letter(a-f or A-F) plus 4 more numbers. ValidationExpression =”^[a|A]+[0-9]+[0-9A-Fa-f]+\d{4}$”
View ArticleFormat string with GridView
One user at ASP.NEt forum asked a question for how to format a 15 digit number(string) with two hyphen (-) inside at position 10 and 15. It can be don easily in SQL: SELECT LEFT(@From,9)...
View ArticleHow to Determine What Fiscal Year of Today Datein ASP.NET?
Here is a code snippet I posted early: protected void Page_Load(object sender, EventArgs e) { int fYear; if (DateTime.Today.Month < 7) fYear = DateTime.Today.Year; else fYear = DateTime.Today.Year +...
View ArticleDynamic sort for a GridView
Here is a sample to pass column variables to control SORT ORDER: <asp:GridView ID=”GridView1″ runat=”server” AutoGenerateColumns=”False” DataSourceID=”SqlDataSource1″>...
View Article