Sending an email to the local domain

I've got a simple method to send emails from the website: ... // local vars using (var mail = new MailMessage(from, sendTo)) { using (var smtp = new SmtpClient()) { mail.CC.Add(cc); mail.Bcc.Add(bcc.Replace(";", ",")); ...
more »

2017-06-16 16:06 (3) Answers

How to set default value using data annotation

I am learning ASP.Net MVC 5 and I want to set default value using data annotation for boolean property. Also I don't want to use the constructor to set the default value. Is it possible? public class BalanceDetailMV { public BalanceDetailMV() ...
more »

2017-06-16 16:06 (2) Answers

Print All data in a grid-IE issue

I am working on the print functionality in and I am using the below code for the print. GridView1.AllowPaging = false; GridView1.DataBind(); StringWriter sw = new StringWriter(); HtmlTextWriter hw = new HtmlTextWriter(sw); G...
more »

2017-06-16 13:06 (0) Answers


I am developing an ASP.NET MVC 5 application for a while now. After an update that changed a lot the database structure, the UI has gone crazy. I think this is a IIS issue since it is only on the client's machine and I am not able to replicate it, b...
more »

2017-06-16 05:06 (0) Answers

Optional Parameters in VB.Net

Here is the situation. My ASP.Net Application's solution has 3 projects A, B and C. B contains a function (eg : testfunction) which is used by Pages in A and C. Now for a certain requirement for Project C I need to make a change in testfunction. In ...
more »

2017-06-15 20:06 (0) Answers

ASP.NET Core Route Tag Helper use Route?

I'm kind off confused about how the asp-route-* tag helper works. What I understand is that it's kind of bound to the routing I've setup. E.g. routes.MapRoute( name: null, template: "{category}/Page{page:int}", defaults: new { controlle...
more »

2017-06-15 14:06 (1) Answers

Scroll a web page with a ShieldUI chart

I have a web page with several content including one or more charts. When I’m on a phone or a tablet, the charts take all the place of the screen. I can’t scroll more my screen. Even if the tooltip and zoom mode aren’t activated. How desactive...
more »

2017-06-15 08:06 (1) Answers

protect pdf file with password c#

connetionString = ConfigurationManager.ConnectionStrings["conString"].ToString(); sql = "select Id,employeeName,employeePosition from Employee"; connection = new SqlConnection(connetionString); connection.Open(); ...
more »

2017-06-15 06:06 (2) Answers

Cookie Middleware without Identity ASP.NET Core v2

I am trying to authenticate without using identity. I have found a few articles describing how to do it in other versions however nothing for ASP.NET Core 2. Below is what I have cobbled together. But when it gets to SignInAsync an exception is thr...
more »

2017-06-14 17:06 (1) Answers

Default page is not working properly

In my project Index.aspx page is set as a default document. I tried to debug is not firing the button click event on localhost:1992,but it is working perfectly on localhost:1992/Index.aspx. ISSUE : project working in localhost:1992/Index.aspx not w...
more »

2017-06-14 17:06 (2) Answers

How to store private key in Key Container?

I want to store a private key in a key container to create a signature over data for an website. //First I Read PrivateKey from text file that i Uploaded with FileUpload(fuPrivateKey) var pk = Encoding.UTF8.GetString(fuPrivateKey.FileBytes)...
more »

2017-06-14 08:06 (2) Answers

Flow Player Not Working For in Asp.Net C#

I am working in c# project, in that i have to play videos from folder path. iam trying below code, the video path binding in datalist is correct, but when i press play button its always spinning, no videos display <asp:DataList ID="DLVid...
more »

2017-06-14 08:06 (0) Answers

Throttling concurrent async requests with loop

I am currently working on making a large amount of requests to a web API. I have tried to async this process so that I can do so in a reasonable amount of time, however I am unable to throttle the connections so that I don't send more than 10 request...
more »

2017-06-13 18:06 (1) Answers

Route Function is not working on Start Page

I have been trying to implement URL Routing in ASP.Net Web Forms (For the first time) with the help of a solution i found on a website [ download the solution ] . Route is working except my Start Page . For example , If I set Home.aspx as start pag...
more »

2017-06-12 12:06 (0) Answers

ClosedXML is not working with .NETCoreApp2.0

I am new to Dotnet-core and working on an app which has Excel manipulation.I chose ClosedXML for the same. When I create a sheet I run into the following issuTypeLoadException: Could not load type 'System.Drawing.ColorTranslator' from assembly 'Syste...
more »

2017-06-11 22:06 (1) Answers

Using ExecuteScalar() in place of ExecuteReader()

I am learning Web API and working on a small project (I know this question is not related to Web API, but just to get to the scene). So I have this function called get_balance(string accountNumber) which returns the balance: -- Function: deposit.get...
more »

2017-06-11 20:06 (1) Answers