How to get the URL of the current page in C#
Try this :
Try this :
I just found the solution and yea it was easier than I thought đ so here is the solution: it works like charm đ
Got the culprit: It’s the extra comma(,) at the end of last email address Just removed that and voila! its working. Don’t know why it’s working in console application but not in sharepoint đ If this does not work in SharePoint then please add each address separately onto MailMessage object like below; }
Trace.WriteLine will do (and probably more methods from the Trace class). You can use a program called DebugView to real-time monitor the trace generated, or write to a log file using you web.config file.
You have a statement (if or while, for example), right before the code you posted, without curly braces. For example: is correct, but the code below: will result in CS1023: Embedded statement cannot be a declaration or labeled statement. UPDATE The reason, according to @codefrenzy, is that the newly declared variable will immediately go out of scope, … Read more
Rather than using Ctrl + K, X you can also just type prop and then hit Tab twice.
I have a string “1112224444′ it is a telephone number. I want to format as 111-222-4444 before I store it in a file. It is on a datarecord and I would prefer to be able to do this without assigning a new variable. I was thinking: but that does not seem to do the trick. … Read more