Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Error after converting from C# to VB

Posted on 2015-01-21
8
Medium Priority
?
255 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 1336 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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

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 1336 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 664 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
Loops Section Overview

926 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