C#, Vb.net Syntax Highlighter?

Apr 10, 2010

I am looking for a code to HTML converter.Let say I have a code

[Code]....

which is in formatted color. Now when I am converting it to the basic HTML convertor it is giving me without color.I have found http://www.manoli.net/csharpformat/ which is generating CSS for the same, which is not possible to add at runtime.

View 12 Replies


Similar Messages:

Asp - JQuery Syntax Highlighter Snippet

Mar 24, 2011

I am using JQuery Syntax highlighter in my asp.net application. [URL] I have included the scripts and CSS file as mentioned in the USAGE section. Also the below code:

<script>
$(document).ready(function(){ $("pre.htmlCode").snippet("html");
// Finds <pre> elements with the class "htmlCode"
// and snippet highlights the HTML code within.
$("pre.styles").snippet("css",{style:"greenlcd"});
// Finds <pre> elements with the class "styles"
// and snippet highlights the CSS code within
// using the "greenlcd" styling.
$("pre.js").snippet("javascript",{style:"random",transparent:true,showNum:false});
// Finds <pre> elements with the class "js"
// and snippet highlights the JAVASCRIPT code within
// using a random style from the selection of 39
// with a transparent background..........................

View 1 Replies

MVC :: No Razor Syntax Highlighter For 3 Released Version

Mar 30, 2011

I download and installed the latest version of MVC3 from this website [URL]. The MVC3 framework works but not the syntax highlighter for Razor or intellisense. Anyone knows how to make this work? Just for your information, I could not install the vs10-kb2483190-x86.exe.

View 6 Replies

Access :: Syntax Error (missing Operator) In Query Expression / Get Conflict With CommandText Syntax

Aug 8, 2010

I'm having problem in inserting text from a textbox in which user write or copy some text which may contain special characters ( " , . ) etc. If there is any special character it get conflict with CommandText Syntax and generates error in inserting. I want to insert all these characters. How could i do it?

Code:

[code]....

View 1 Replies

Why Can't Use C# Syntax In Inherits Attribute For A Closed Generic But CLR Syntax Is Fine

Jan 15, 2011

The following CLR syntax works fine in my aspx page:

<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="Website.MyBasePage`1[HomePageViewModel]" %>

But this C# syntax does not:

<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="Website.MyBasePage<HomePageViewModel>" %>

Note, I am not using ASP.NET MVC, but this works fine if using System.Web.Mvc.ViewPage<> from ASP.NET MVC.
My MyBasePage looks like this:

public class MyBasePage<TModel> : Page where TModel : class {
public TModel Model
{
get { return (TModel)HttpContext.Current.Items["model"]; }
}
}

View 1 Replies

MVC :: 3 RC2 - Convert ASPX Syntax To Razor Syntax For Asp:Hyperlink?

Dec 15, 2010

For reporting we used report RDLCs and displayed using an ASPX form. We implemented using the route as shown below. This resulted in forcing us to use the page route below and also to use the hyperlink instead of the normal Action Link. The question is how do we convert the asp:hyperlink ASPX syntax to Razor syntax.

//Custom route for reports routes.MapPageRoute( "ReportRoute", // Route name "Reports/{reportname}", // URL "~/Reports/{reportname}.aspx" // File );
<li><asp:HyperLink ID="hypReport" runat="server" NavigateUrl="<%&#36;RouteUrl:routename=ReportRoute,reportname=StaffRpt%>">Staff Report</asp:HyperLink></li>

View 2 Replies

SQL Server :: EXEC 17P_Comose Will Give Incorrect Syntax Error - Incorrect Syntax Near '17'

Sep 15, 2010

I am working with a sql server database with about 50 stored procedures. The database and stored procedureswere not created by me. The stored procedures all begin with a number in their name.

Example: 17P_Comsetter

The problem I am having is that if I try and execute the stored procedure at the command line in Query Analyzer,the query analyzer appears not to like that the stored procedure begins with a number. For example:

If I try an run the stored procedure as follows:

EXEC 17P_Comsetter

Then I get the following error message:

Msg 102, ..... Incorrect Syntax near '17'

I am using SQL server 2005. Does anyone know why I am getting this error message?

View 1 Replies

ADO.NET :: Not Working Showing Syntax Error Syntax Error:operand Is Missing?

Mar 25, 2011

DataRow[] filterRows = ds.Tables[0].Select("Running Status= case State when 'True' then 'Running' When 'False' Then 'Stoped' end Where Active='1' and State='1'");

this is not working showing syntax error syntax error:operand is missing

View 3 Replies

Syntax Near The Keyword?

Jul 4, 2010

I am trying to use this code:
PHP Code:

string connVac = "Database connection...";
SqlConnection dbConnVac = new SqlConnection(connVac);

DataSet dsInfo = new DataSet();

[code]....

But i need to change it so it shows the Job name, details and then the regions..

View 5 Replies

C# - Sql Syntax How To Do A Join

Mar 24, 2011

Im trying to retrieve a path name from my Pictures table the pathname is stored under picturepath in my Pictures table I dont know how to join it on to my current sql syntax it uses the UserID which is set by a session.

And im unsure what goes in the commented line for my image url string?

using (OdbcCommand cmd = new OdbcCommand("SELECT Wallpostings FROM WallPosting WHERE UserID=" + userId + " ORDER BY idWallPosting DESC", cn))
{
using (OdbcDataReader reader = cmd.ExecuteReader())
{
test1.Controls.Clear();
while (reader.Read())
{
System.Web.UI.HtmlControls.HtmlGenericControl div = new System.Web.UI.HtmlControls.HtmlGenericControl("div");
div.Attributes["class"] = "test";
//div.Style["float"] = "left";
div.ID = "test";
Image img = new Image();
img.ImageUrl = String.Format("{unsure}", reader.GetString(unsure));
// this line needs to be represented in sql syntax
img.AlternateText = "Test image";
div.Controls.Add(img);
div.Controls.Add(ParseControl(String.Format("{0}", reader.GetString(0))));
div.Style["clear"] = "both";
test1.Controls.Add(div);

View 1 Replies

Understanding Syntax In C#?

Apr 23, 2010

understand what is going on in the code line below:

Table t = (Table)Page.FindControl("Panel1").FindControl("tbl");
I understand Page.FindControl("Panel1").FindControl("tbl");
Why is there a (Table) before the Page.FindControl?

View 4 Replies

ADO.NET :: Incorrect Syntax Near ')'.

Dec 2, 2010

Server Error in '/' Application.

Incorrect syntax near ')'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: Incorrect syntax near ')'.

Source Error:

[Code]....

Line 25:SqlDataAdapter sda = new SqlDataAdapter(cmd);Line 26:DataSet ds = new DataSet();Line 27:sda.Fill(ds);Line 28:Label1.Text = ds.Tables.Count.ToString();Line 29:

View 3 Replies

Converting VB To C# - What Is Proper Syntax

Jul 6, 2010

I am trying to conver this to C# but Item is not a method in C#

Repno is a string variable of 3 characters

First if rep is not null

then

confirm that Repno the field salespnno from the query.

[code]....

View 2 Replies

C# - Parseable MVC Razor Syntax

Sep 15, 2010

Here is what I would like to express by Razor:

<b>@parameterMapping.Title</b> (Category: @parameterMapping.Category.Title, Regexp: @parameterMapping.Regexp)

But to make it parseable I have to write it this way:

<b>@parameterMapping.Title</b> <text>(Category: </text> @parameterMapping.Category.Title <text>, Regexp:</text> @parameterMapping.Regexp <text>)</text>

Are there better ways to solve this problem?

View 1 Replies

Use Razor Syntax In Web Application (not MVC)?

Feb 27, 2011

How does one create a .cshtml page in an ASP.NET web application? The option to choose Razor is obvious when using MVC - it appears when adding a view. But I can't seem to figure out how to accomplish this in a plain ASP.NET Web Application. Is it even possible?

View 1 Replies

Syntax For Retrieving A Value From A SqlDataSource?

Dec 28, 2010

the syntax for retrieving a value from a SqlDataSource? I've managed to get it working using numbers to represent the column, but I'd much rather use it's DB name?

[Code]....

View 2 Replies

MVC :: 2 - Syntax For External Link

Oct 22, 2010

I am trying to create a link that is distributed via eMail. This link will direct the user to a View inside my MVC2 application. I will need to pass 2 parameters with this link. Background: The eMail is an invitation. The user will click the link inside the eMail to RSVP for a meeting. When the link is clicked I want the user to be directed to a certain controller action/view. The parameters will be an eMail address (string) and a meeting ID (int).

The controller action will use the parameters to process logic that determines what the view will display.
An example using the following would be perfect:

Controller action / View name: RSVPmeeting
Parameter: AttendeeEMail (string)
Parameter: MeetingID (int)

View 3 Replies

C# - What Is The Syntax For If False In NVelocity

Feb 9, 2010

What is the syntax for an not true or false if statement in nVelocity (or Velocity)?

And more importantly, where is this in the nVelocity docs? I've been Googling for quite a while to no avail.

I've tried several different combinations such as:
#if (!$artist.IsFestival)
$artist.FestivalName
#end
and
#if ($artist.IsFestival == false)
$artist.FestivalName
#end

So frustrating!

View 1 Replies

ADO.NET :: Default Values In SQL Syntax / MVC?

Aug 24, 2010

I have a repository function called getList which retrieves certain information that gets posted to it from a form. My form has 6 fields, and a user can enter searvh criteria in any or all the fields. According to what he has entered, I must execute a SQL string to retrieve matching information.

I have the following:

[Code]....

But, if a user enters only a surname, my query will return no results. Is there a way format my sql string to allow default values, or maybe build the sql string at runtime. In MS-SQL it was easy to do, but how would one do it in LINQ??

View 6 Replies

Asp - Syntax Error In FROM Clause

Oct 18, 2010

I'm working on asp.net web application & for this use MS access for back end, My Query is given below which is successfully executed on MS Access but error on front end ("Syntax Error in FROM Clause")

select USER.EMPID as EMPID,USER.FULLNAME as FULLNAME,
USER.USERNAME as USERNAME,Employee.ROLEID,ROLE.ROLENAME AS ROLE
FROM USER
inner join employee on user.userid=employee.userid
inner join role on employee.roleid=role.roleid
WHERE USER.EMAIL='admin@itiersolutions.com'
AND USER.PASSWORD='cZdqAEeDV2EVzA1JNFJ6hQ=='
AND USER.STATUS='Enable'

View 4 Replies

SQL Server :: Correct Syntax To Do A LIKE In VB.net?

Oct 12, 2010

I want to do a LIKE clause in an SQL statement. What is the proper syntax if this if my informaiton.I want to select personID, personName, personBuilding From Table: main27WHERE personName has the Name 'Smith' in it. Note that person Name is set up as: Last Name, First Name = Smith, John.The query works fine in my access database, but I am trying to put it in a VB.net application and I can't get it to pull any records when there are 18.

View 6 Replies

ADO.NET :: Getting Error / Incorrect Syntax Near ''

Nov 14, 2010

I keep getting the error: 'Incorrect Syntex near 'treatmentMedication'. Syntex error:

[Code]....

This is my class code:

[Code]....

View 2 Replies

MVC :: VB Syntax For Validation In ViewModel?

Jul 14, 2010

http://weblogs.asp.net/shijuvarghese/archive/2010/02/01/view-model-pattern-and-automapper-in-asp-net-mvc-applications.aspxThat's Great, but it is in #C like every other tutorial I find. Note his ContactViewModelWell here is mine:

[Code]....

How do I add validation in the same fashion as he did in his blog in VB?

View 6 Replies

Syntax - Repeater Not Repeating :0) (asp.net)(vb)?

Apr 15, 2010

Morning stackoverflow,I have a repeater, with the following code in my aspx page;

<asp:Repeater ID="Contactinforepeater" runat="server">
<HeaderTemplate>
<h1>Contact Information</h1>

[code]...

View 1 Replies

C# Null Syntax - How To Set A Field To Be Nullable

Feb 6, 2011

I remember being told that you can add some syntax to the end of a statement that will do something if the field is null. Pretty vague, but I cant seem to find anything about it via google.

I definitely isnt how to set a field to be nullable. I know that.

Here is an example of what I want.

int? field1 = 0;

field1 = int.parse(string2); (where string2 is a passed value, that could be null)

I thought there was something you could put at ?? if it is a null, such as:

field1 = int.parse(string2) ??;

Or do I have to check every if every string2 is null before making that statement.

View 16 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved