ASP.NET does not allow you to place a radio button in a gridview row and have only a single radio button selected at a time.
I came across this post that solved by problem.
http://www.dotnetlearners.com/blogs/view/216/allow-only-single-radio-button-selection-in-aspnet-gridview.aspx
It uses this javascript function to change the other selected value:
<script language="javascript">
function singleRbtnSelect(chb) {
$(chb).closest("table").find("input:radio").prop("checked", false);
$(chb).prop("checked", true);
}
</script>
My professional notes on programming. Included in my notes are discussions on VB.NET, Microsoft Office, and some C#. I am just starting to learn about C# so as I learn more I will add more.
Wednesday, November 23, 2016
Monday, November 21, 2016
VB.NET - Reference for Working with PDF's using iTextSharp
I have found this blog useful for how to use iTextSharp when working with PDF's.
http://www.worldbestlearningcenter.com/index_files/csharp-combine-pdf-files.htm
http://www.worldbestlearningcenter.com/index_files/csharp-combine-pdf-files.htm
Tuesday, September 20, 2016
SQL - Query Triggers in a Database
SELECT
o.name AS trigger_name
,'x' AS trigger_owner
,s.name AS table_schema
,OBJECT_NAME(o.parent_obj) AS table_name
,OBJECTPROPERTY(o.id, 'ExecIsUpdateTrigger') AS isupdate
,OBJECTPROPERTY(o.id, 'ExecIsDeleteTrigger') AS isdelete
,OBJECTPROPERTY(o.id, 'ExecIsInsertTrigger') AS isinsert
,OBJECTPROPERTY(o.id, 'ExecIsAfterTrigger') AS isafter
,OBJECTPROPERTY(o.id, 'ExecIsInsteadOfTrigger') AS isinsteadof
,OBJECTPROPERTY(o.id, 'ExecIsTriggerDisabled') AS [disabled]
FROM sysobjects AS o
INNER JOIN sysobjects AS o2
ON o.parent_obj = o2.id
INNER JOIN sysusers AS s
ON o2.uid = s.uid
WHERE o.type = 'TR'
*Credit goes to the poster here: Stack Overflow - Get Triggers in Database
Thursday, March 24, 2016
VB.NET - Execute Command Lines
To call a command prompt in one line, it can be done this way:
To call a command prompt with more options, such as running with the command prompt hidden, call this way:
Here are what some of the command arguments mean:
Process.Start("cmd", "/c cd " & m_strSignToolLocation
& "
& " &
strSignCmd)
To call a command prompt with more options, such as running with the command prompt hidden, call this way:
Dim p As Process = New Process()
Dim pi As ProcessStartInfo = New ProcessStartInfo()
pi.Arguments = "/c cd " & m_strSignToolLocation
& "
& " &
strSignCmd
pi.FileName = "cmd.exe"
pi.WindowStyle = ProcessWindowStyle.Hidden
p.StartInfo = pi
p.Start()
Here are what some of the command arguments mean:
'/k returns the command
window
'/c terminates the command
window
'&
allows multi line execution on a single line
Thursday, February 11, 2016
SQL - Find Stored Procedures that have been Renamed
The following script will determine if any stored procedures were renamed, rather than dropped and re-created (substitute [DATABASE NAME] with the name of your database):
SELECT meta.ROUTINE_NAME, *
FROM [DATABASE NAME].sys.sql_modules def,
[DATABASE NAME].INFORMATION_SCHEMA.ROUTINES meta
WHERE SUBSTRING(def.definition,1,4000) = SUBSTRING(meta.ROUTINE_DEFINITION,1,4000)
AND def.definition NOT LIKE '%![' + meta.ROUTINE_NAME + '!]%' ESCAPE '!'
order by 1
Subscribe to:
Posts (Atom)