Solved

Error after converting from C# to VB

Posted on 2015-01-21
8
246 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
ID: 40563272
did you add dhtmlx dll  reference to project references?
0
 

Author Comment

by:rrhandle8
ID: 40563286
Yes.  I added it in a previous step.
0
 
LVL 13

Assisted Solution

by:Jesus Rodriguez
Jesus Rodriguez earned 334 total points
ID: 40563317
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
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 

Author Comment

by:rrhandle8
ID: 40563336
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
 
LVL 13

Accepted Solution

by:
Jesus Rodriguez earned 334 total points
ID: 40563346
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
ID: 40563358
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
ID: 40563378
you can do that too as FarWest recommend
0
 

Author Comment

by:rrhandle8
ID: 40567844
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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

820 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