Sunday, November 8, 2020
sql server remove duplicates from query
Wednesday, October 28, 2020
Remove all table rows except first
You can use jQery to easily remove rows from a given table.
//using jQuery find
$(function() {
$("#tableId").find("tr:gt(0)").remove();
});//using empty
$(function() {
$("#tableId > tbody").empty();
});
The second method is more efficient than the first approach.Regards,Samitha
Saturday, October 17, 2020
.Net get plain text from HTML
There can be situations where you want to get plain text from HTML content. We can use Regex and HttpUtility.HtmlDecode as the easiest way to get plain text shown below.
String plainText =HttpUtility.HtmlDecode( Regex.Replace(HtmlString, "<(.|\n)*?>", "") );
Cheers,
Samitha
Thursday, October 1, 2020
Role does not have permission for this action in QNA Maker
When you are working with Azure QNA Maker you might get the message "role does not have permission for this action in QNA Maker"
Once you have finished creating QNA, the entire page (not the Refresh Button on the QnAMaker.ai/Create page) needs to be refreshed and the above message will be disappeared.
Cheers
Samitha
Tuesday, September 15, 2020
using iif to check null
IIf is a function which evaluates all its arguments, Vb net has if operator which works similar to the short circuit if operator.
e.g.
varName = If(objName Is Nothing, "", objName.ToString())
Monday, August 31, 2020
kendo MultiColumnComboBox change selected value
If you are working with the Kendo MultiColumnComboBox you might observe that even if try to reset the selected value you can n't do that.
Even if you try to set value to blank that will not be updated. The way to achieve this is shown as below.
var ddlOptions = $("#ddlOptions").data("kendoMultiColumnComboBox");
ddlOptions.value("");
ddlOptions.trigger("change");
Cheers
Samitha