ListViewItem lvi = e.Item; int id = Convert.ToInt32(ListView1.DataKeys[lvi.DataItemIndex].Value);
world wide web development problems asp net php html xhtml css javascript jquery w3dproblems
Friday, August 15, 2014
Get datakey value inside listview itemcommand
Tuesday, August 12, 2014
How do I use an INSERT statement's OUTPUT clause to get the identity value?
DECLARE @OutputTbl TABLE (ID INT) DECLARE @ID int INSERT INTO TBL(Name, Email) OUTPUT INSERTED.ID INTO @OutputTbl(ID) VALUES ('ABC', 'email@gmail.com') SELECT @ID = ID FROM @OutputTbl ot
Friday, August 1, 2014
Disable button on form submit using jQuery
JQuery
<script> $('form').submit(function () { $(this).children('[type=submit]').prop('disabled', true); }); </script>
Saturday, June 14, 2014
How to get list of available SQL Servers instances using C#
/// <summary> /// Get SQL Server Instances if possible /// </summary> private static string[] GetSQLServerInstances() { List<string> instances = new List<string>(); try { System.Data.Sql.SqlDataSourceEnumerator instance = SqlDataSourceEnumerator.Instance; System.Data.DataTable table = instance.GetDataSources(); foreach (System.Data.DataRow row in table.Rows) { instances.Add(row[0] + "\\" + row[1]); } } catch (Exception) { } return instances.ToArray(); }
Subscribe to:
Comments (Atom)