[Solved] Get Substring – everything before and after certain characters [closed]

You could use regular expressions, e.g: class Program { static void Main(string[] args) { var input = ” SUCCESS Post Policy Success INVOICE No. :: WS1704003404 || Policy No :: 59203313 || App No. :: 123456724 “; var pattern = @”::\s*(\w+)\s*”; var matches = Regex.Matches(input, pattern); foreach (Match match in matches) Console.WriteLine(match.Groups[1].Value); } } 1 … Read more

[Solved] ASP.NET TextBox with Suggestions

You didn’t specify if this is in a web page (ASP.NET using c#) or a Windows form. For ASP.NET I like the Ajax Control Toolkit, and it has an AutoComplete control that you could use to do this. http://www.asp.net/ajax/ajaxcontroltoolkit/samples/autocomplete/autocomplete.aspx If you want it for a Windows Forms app, see here: http://csharpdotnetfreak.blogspot.com/2009/01/winforms-autocomplete-textbox-using-c.html 1 solved ASP.NET TextBox … Read more

[Solved] Incorrect syntax near ‘=’ … Error in .ashx file [closed]

Do something like this: if(imageid != null) { SqlCommand command = new SqlCommand(” select Image from ImageStore where ImageID=” + imageid, connection); SqlDataReader dr = command.ExecuteReader(); dr.Read(); context.Response.BinaryWrite((Byte[])dr[0]); } else { SqlCommand command = new SqlCommand(” select Image from ImageStore where ImageID=0″, connection); SqlDataReader dr = command.ExecuteReader(); dr.Read(); context.Response.BinaryWrite((Byte[])dr[0]); } 1 solved Incorrect syntax near … Read more

[Solved] How to upload (multiple) files to SharePoint Online using CSOM?

I tested the below code in my local environment; it works fine. <div> <asp:FileUpload ID=”upldGradeReport” runat=”server” /> <asp:FileUpload ID=”upldExpenseReceipt” runat=”server” /> <asp:Button ID=”btnSubmitForm” OnClick=”SubmitButton_Click” runat=”server” Text=”Submit” /> </div> protected void SubmitButton_Click(object sender, EventArgs e) { sendToSharePoint(); Response.BufferOutput = true; Response.Redirect(“Submission.aspx”); } protected void sendToSharePoint() { try { string siteUrl = “https://tenant.sharepoint.com/sites/lee”; ClientContext clientContext = new … Read more

[Solved] What language is he using?

It does look like some template engine rather then separated language. You could read about the available template engines here. They essentially exchange the text encoded information to the underlying data, in your case I don’t know which particular engine it is, however it may be something made especially for this task so it is … Read more

[Solved] How to create Horizontal Bar charts with clickable option in HTML5 in ASP .net MVC4 application? [closed]

You say: “I never mind getting negative votes.” … I’ll label you as “doesn’t play well with others” 🙂 Anyway, there’s a lot of excellent code that does the charting you need, but your key is how to use your MVC controller to inject that code into your view. Here’s a great article on how … Read more

[Solved] How can I send the same email message to more than 3000 customers [closed]

List<Customer> customerList = GetAllCustomers(); string subject = “Hello World”; string content = GetContent(); // Loop through all customers and send e-mail to each foreach(Customer customer in customerList) { MailMessage newMail = new MailMessage(“[email protected]”, customer.Email, subject, content); newMail.IsBodyHtml = true; SmtpClient sender = new SmtpClient(); sender.Send(newMail); } You can move the GetContent() within the loop if … Read more