Solved

Error after converting from C# to VB

Posted on 2015-01-21
8
235 Views
Last Modified: 2015-01-23
Trying to install a 3rd-part application.  The code supplied in the documentation is C#.  I converted it to VB at www.telerik.com.

After pasting it into data.ashx.vb, the IHttpHandler and the SchedulerDataContext have errors.

See screen shot --> http://screencast.com/t/ubhO2SwfvL9

Here is the C# code:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
 
using DHTMLX.Scheduler.Data;
 
namespace SchedulerNetAsp
{
   public class Data : IHttpHandler
    {
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/json";// the data comes in JSON format
            context.Response.Write(
                new SchedulerAjaxData(new SchedulerDataContext().Events) //events for loading to scheduler
                );
        }
 
        public bool IsReusable { get { return false; }}
    }
}

Open in new window

0
Comment
Question by:rrhandle8
  • 3
  • 3
  • 2
8 Comments
 
LVL 12

Expert Comment

by:FarWest
Comment Utility
did you add dhtmlx dll  reference to project references?
0
 

Author Comment

by:rrhandle8
Comment Utility
Yes.  I added it in a previous step.
0
 
LVL 13

Assisted Solution

by:Jesus Rodriguez
Jesus Rodriguez earned 334 total points
Comment Utility
You need to properly do the code in this line
Public Sub ProcessRequest(context As HttpContext)

Open in new window

it needs to be like this
 
Public Sub ProcessRequest(context As HttpContext) Implements IHttpHandler.ProcessRequest

Open in new window



look at this page and has similar code like your needs
http://blog.scheduler-net.com/post/DHTMLX-Scheduler-NET-in-Visual-Basic.aspx
0
 

Author Comment

by:rrhandle8
Comment Utility
Adding "Public" did do anything.  Ya, they have VB samples, and none of them compile.  Support is next to nothing.  A very frustrating week trying to install this thing.  Beginning to think it is company to stay away from.  I post a project asking someone to get this installed for me.  Wow!  The quotes were around $700 to getting the sample site running.  Do you know any makers of a Scheduler for VB.Net?
0
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 
LVL 13

Accepted Solution

by:
Jesus Rodriguez earned 334 total points
Comment Utility
Telerik do a great schedule for ASP>NET but is expensive to get the collection but it worth it to get the whole dev craft. Will be amazing and has a well documented examples and videos, but is your willing to work a little more you can check this code (is on C# but you can convert to vb.net)
http://www.codeproject.com/Articles/591271/A-Simple-Scheduler-in-Csharp
0
 
LVL 12

Assisted Solution

by:FarWest
FarWest earned 166 total points
Comment Utility
if it is working in c# , why not keeping it in c# and build a library project that can be called from you vb project
0
 
LVL 13

Expert Comment

by:Jesus Rodriguez
Comment Utility
you can do that too as FarWest recommend
0
 

Author Comment

by:rrhandle8
Comment Utility
It appears the biggest problem here is not VB vs C#, but MVC vs webforms.  There is no documentation for Webforms.  They offer their services for a price, so I asked them to install it.  No answer after 48 hours.  I'll hire someone to do this.

Thank you for your help.
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now