Microsoft Dot Net Master
Microsoft Dot Net Master
Monday, June 22, 2020
How to calculate work days except Saturday and Sunday
Wednesday, June 17, 2020
DateDiff to output hours and minutes
Very simply:
CONVERT(TIME,Date2 - Date1)For example:
Declare @Date2 DATETIME = '2016-01-01 10:01:10.022'
Declare @Date1 DATETIME = '2016-01-01 10:00:00.000'
Select CONVERT(TIME,@Date2 - @Date1) as ElapsedTimeYelds:
ElapsedTime
----------------
00:01:10.0233333
(1 row(s) affected)
Tuesday, June 16, 2020
Get value of ReadOnly TextBox in ASP.Net and retain its value across PostBack
Here Sandeep Kumar Rauniyar has explained how to get the
value of ReadOnly TextBox on PostBack and also how to retain its value across
PostBacks.
In this article I will explain how to get the value of ReadOnly TextBox on PostBack and also how to retain its value across PostBacks.
Thursday, June 4, 2020
Set MaxLength property to Multiline Textbox
It is so easy to limit the number of characters allowed in a normal textbox by using MaxLength property, But same doesn’t work if the TextMode property of textbox is set to Multiline.
By default TextMode = "SingleLine" for a normal textbox, and it gets rendered as an input type textbox and when we set its TextMode property to MultiLine, it gets rendered as a textarea.
Note: MaxLength property works only for input type and not for textarea. So to handle this, either you can use JavaScript, jQuery or any other scripts. But in this article I used C# to handle this.
So let's take an example, and take one normal textbox and one multiline textbox and see differences before and after writing codebehind.
.aspx:
- <asp:TextBox ID="txtMultiLine" runat="server" TextMode="MultiLine" MaxLength="5"></asp:TextBox>
- <br />
- <asp:TextBox ID="txtNormal" runat="server" MaxLength="5"></asp:TextBox>
- using System;
- using System.Web.UI;
- namespace Maxlength
- {
- public partial class MacLength : System.Web.UI.Page
- {
- protected void Page_Load(object sender, EventArgs e)
- {
- if (!Page.IsPostBack)
- {
- txtMultiLine.Attributes.Add("maxlength", txtMultiLine.MaxLength.ToString());
- }
- }
- }
- }
Monday, September 11, 2017
How to fixed an error message invalid value for the "InputManifest" parameter of the "GenerateApplicationManifest" task in visual studio
"obj/x86/Debug/namespace.exe.manifes" is an invalid value for the "InputManifest" parameter of the "GenerateApplicationManifest" task. Multiple items cannot be passed into a parameter of type "Microsoft.Build.Framework.ITaskItem".
![]() |
| An error message invalid value for the "InputManifes" parameter of the "GenerateApplicationManifest" task |
1. First, right click on project namespace in Solution Explorer panel and then choose properties
or go to menu bar--> click on Project --> click on your project namespace properties...
2. Go to Security Tab and then uncheck on Enable ClickOnce security settings
Done....now your problem is solved....enjoy it :



