Writing cline side code from VB.NET code

I have a script where in I want to write client side javascript code and send it to the browser where it will display the disired affects.

But the client side tag "</script>" makes the ASP.NET engine look at it as an end of the main server side block:
<script Language="VB" Option="Explicit" runat="server">

I am using inline code for VB.NET, not code behind.

With warm regards,
Dolphus Periera


With warm regards,
Dolphus Pereira
0
dolphusp
11/4/2006 8:20:34 AM
asp.net.web-forms 93655 articles. 6 followers. Follow

4 Replies
1144 Views

Similar Articles

[PageSpeed] 56

The script block tag you posted is marked as runat="server" which makes it a server side script block

??


Mike Banavige
~~~~~~~~~~~~

Need a site code sample in a different language? Try converting it with: http://converter.telerik.com/
0
mbanavige
11/4/2006 1:06:03 PM

No you misunderstood my code, it is as follows:

<script Language="VB" Option="Explicit" runat="server">
    Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        <<...other code...>
        Body1.Text="<script language=javascript> document.write('"+EmailJS+"');"+"</script>"
        <<...other code...>
    End Sub
</script>

-Dolphus Pereira


With warm regards,
Dolphus Pereira
0
dolphusp
11/7/2006 4:27:58 AM

I think you are using the 1.1 framework as i think this was resolved in 2.0.

Break your </script> tag apart so that it can't accidentally be recognized as a server side tag.

    Body1.Text="<script language=javascript> document.write('"+EmailJS+"');"+"</sc"+"ript>"


Mike Banavige
~~~~~~~~~~~~

Need a site code sample in a different language? Try converting it with: http://converter.telerik.com/
0
mbanavige
11/7/2006 4:54:52 AM
Thanks Mike, it worked.
With warm regards,
Dolphus Pereira
0
dolphusp
11/8/2006 6:23:49 AM
Reply:

Similar Artilces:

How to convert C#.Net code to VB.Net code ???...
HI, i was searching something new, then i suddenly find some tips to convert C#.Net code to VB.Net but i did not do well. i am puttint its url here plz tell me how to convert C#.Net code to VB.Net. http://www.dotnetspider.com/code/C-273-Convert-C-VB-NET.aspx Jasim...Please remember to click “Mark as Answer” on the post that helps youJasim AkhtarNew Delhi ( INDIA ) It would be better if you write the problem you having, while converting from C# to VB.NET. You cannot completely rely on online converters. ThanksMark post(s) as "Answer" that helped youElectronic ScrewWebsite||Bl...

Translate c#.net code to vb.net code
Hi I can usually do the translation myself, but this time I am a bit stumped  Let us consider to rewrite Urls (more than 16000 links) using a table. Save original url and rewritten url in a table. Now add a class file in App_Code folder. class UrlRewriteModule : IHttpModule{    public void Dispose()    {        // Nothing to dispose    }    public void Init(HttpApplication context)    {        context.BeginRequest += new EventHandler(context...

Code generation in Microsoft.net ( code that writes code ) Whats its future
Hello, I was just reading a book about Code Generation in .NET. Its damn hard book to read. What do u think is the future of Code GenerationHighOnCodingWanna get high! It's being used now quite a bit. Not necessarily out the box click a button, and you get an application, but applications will generate specific code to function dynamically.Kay LeeMySpace.com - http://www.myspace.com/kragieInfrastructure GroupMySpace.com- Code to live, but Live to code. the refactoring tools already available (and those that are destined for the new IDE) use the same techniques. we will pr...

use VB.NET and C#.NET code in the same C#.NET project
All-- Here is a sample that is "off the beaten path", (at least for me). Is it possible, in an ASP.NET application, using the code-behind page building technique, to have both pages written in VB.NET and pages written C#.NET?At http://www.WebLogicArts.com/DemoList.aspx there is a sample that shows that, (contrary to popular belief), it IS possible to mix ASP.NET pages built with C#.NET with ASP.NET pages built with VB.NET in the same VS.NET 2003 project. Note that this is just a "fun" sample to see if it can be done and I do not recommend this practice as a "standard" way of develo...

How to start coding vb.net(web form and Crystal repotrs)
I use Crystal Report in Visual Studio.NET 2003..... Example at Northwind database I want a application that.....a form include a combobox that contain CustomerID.....If I choose one CustomerID and click OK button....a Report will display information about this Customer......I think that must use Paramater.....how to do that ???? (please help me step by step,I try it before but not success) please help me !!! There is sample code and tutorials on my blog entry: http://dotnetjunkies.com/WebLog/richard.dudley/archive/2004/05/03/12692.aspxIf my post is your answer, please mar...

Is there a software to convert VB codes to VB.net codes automatically?
hi there! Do anyone of you know if there is any software to convert VB codes to VB.net codes? Or must i maunally convert them? Visual Studio.NET 2000 and 2003 versions automatically convert VB 6 code to VB.NET code, for the most part. Refer to Preparing Your Visual Basic 6.0 Applications for the Upgrade to Visual Basic .NET for more information. Hope this helps, AppanASP.NET Team This posting is provided "AS IS" with no warranties, and confers no rights. thanks! =) Is this case same for Visual C codes? Same concept. Refer to Managed Extensions for C++ Migratio...

change web form background property from code in vb.net
I have a web form in a vb.net project. The web form has both a design view and an HTML view. In the design view, the property box has a background property that can be set to an image file. This causes a background attribute to be added to the Body element in the HTML view. My question is, how do I modify the background property from program code? I can't find the object that has this property so I can set its value. On way to do it is to use 2 different style sheet and change the stylesheet in the pageload event depending on your condition. Look for an example in Report Starter Kit ...

Is it possible to write code in C# and VB.Net in one web project?
We are about to start working on new website. Development will be done using VS2005. One guy is comfortable in C# and I am comfortable in VB.NET. Is it possible to create multi language project/solution?  If yes, what the best approach to start working on this kind of site. There will be around 10-15 classes for our Data access. Currently those classes are written in VB and lies in App_Code folder. Any help would be greatly appreicated. Thanks,   Unfortunately you cannot "mix" languages in one single project. What you could do is use a single file page (no code behind) and ...

How can I coding --> auto refreshing Crystal report via vb.net-->web form
please help me I must show the report(real time) that data come from database --> (data are from another program) User open my webpage for looking the report-->update data How can I set report automatic. --> automatic refresh<----- thanks so much If your report is using the CrystalReportViewer, and you are not exporting the report to PDF or Excel, I would simply set a META Refresh in the header. Here is a reference: http://www.htmlhelp.com/reference/html40/head/meta.html This will cause the page to reload from the server at a specified interval....

Migrate code from vb.net to C#.net
Hello friends, I had created a web site using visual studio 2005. web site was created using the language vb i.e. VB.net. Now as per the clint requirement I have to migrate all the code in C#. So the question is that is there any tool or any inbuild utility in Visual Stuidio so that we can migrate the site from vb.net to C#.net. Or we have to do it mannually i.e. by changing each and every line of code mannually? Kindly suggest me. Thanks & Regards Girish NehteThanks & RegardsGirish NehteIf This post helps you to solve your problem please mark this as an answer. Hi, at the mome...

what is the equivalent C# code for the below Vb.net code
Hello Mate!,                 Could you please tell me the Equivalent C# CODE. This the code: Public Class DatabaseDim Conn_String As String  Public Sub New() Conn_String = ConfigurationManager.ConnectionStrings("SQL").ConnectionString End SubPublic Sub ExecuteNonQuery(ByVal procName As String, ByVal parameters As Object())Dim ctr As Integer = 0 ctr = SqlHelper.ExecuteNonQuery(Conn_String, procName, parameters) End Sub  Public Function ExecuteReader(ByVal procName As String, ByVal pa...

how to convert VB.NET code this code to C#
Hi I have the following code whihc I need to convert to C# since I dont know VB.NET any ideas how to do this: Imports System.IO Imports System.Reflection Add the following code to the class: Private Function GetSql(ByVal Name As String) As String Try ' Get the current assembly. Dim Asm As [Assembly] = [Assembly].GetExecutingAssembly() ' Resources are named using a fully qualified name. Dim strm As Stream = Asm.GetManifestResourceStream(Asm.GetName().Name + "." + Name) ' Read the contents of the embedded file. ...

How to migrate code from vb.net to c#.net?
Hi all,If anybody knows information on migration of VB.Net application to C#.net. i.e Any tools available, best practices, methodology for estimation. etc.   RegardsHelen    Hey, Take a look at this topic http://forums.asp.net/t/1100603.aspxMaybe some of these sites can be of help to you.  Arnold you can do it by page by page just copy and paste ur page in the following link http://labs.developerfusion.co.uk/convert/vb-to-csharp.aspx and convert ur vb.net to c# gotcha!!YasserSpica.www.spica.aewww.bncnetwork.netPlease remember to mark as answers i...

How to change vb.net code to C#.Net ?...
Hi, Earlier i had a class  that i got it from this Forum, it in vb.net and i am trying it to convert it in c#.net but i am unable to covert properly to work. the functionality of this class is to convert number value to words. i am putting both of code c#.net and VB.net please rectify it.Public Class NumberToWords Dim Character As String Public Function ConvertNumber(ByVal A As Double) As String On Error Resume Next Dim MM Dim IM ConvertNumber = "" MM = Microsoft.VisualBasic.Len(A) IM = Microsoft.VisualBasic.Left(A, Mic...

Web resources about - Writing cline side code from VB.NET code - asp.net.web-forms

Pulitzer Prize for Feature Writing - Wikipedia, the free encyclopedia
1979: Jon D. Franklin , Baltimore Evening Sun , for ' Mrs. Kelly's Monster ', "an account of brain surgery ." 1981: Teresa Carpenter , Village ...

Writing as therapy: how blogs and memoirs can help the sick and traumatized
Whether the the inky cousin of selfie culture, or the long tail of the creative writing mania, writing as therapy is having a moment. Can it ...

Student writing: grade 4 students explore animal rights
St Kilda Primary School students have been learning the power of persuasive writing. Here three students explore shark culling and horse racing. ...

Review: Apple Pencil is the best iPad writing tool yet … if you can handle the Pro’s size
... While Pencil is not required to use the iPad Pro, it’s especially interesting because it’s Apple’s first official solution for handwriting, ...

Don't Lose Confidence in Your Writing
... originally published on November 20th. Mel You're as good as anyone else! That's usually the opening to blog posts about how to keep on writing, ...

16 Tips on Blog Writing and Formatting
... same ideas over and over again. My point is that you ought to take advice with a grain of salt. And that applies to this post as well. Writing ...

On Gratitude and Writing Your Own Story
... after all this, it’s time that I realize that my story only needs me to complete it. I don’t need to wait for my story to be written. I’m writing ...

Jaden Smith ‘sees himself as a modern-day prophet’ & he’s writing a book
I feel sorry for the Smith kids, Jaden and Willow. They have all that money, access and potential, and they’re just… struggling, I think. Part ...

App turns your writing into trippy 3D images
It's easy to imagine a piece of art in your head, but making it real is another matter if you're not an artist. Wouldn't it be nice if you could ...

"Goodnight Mommy" Directors Are Re-Writing The Rules Of Horror
And the Academy just may take notice. Aside from categories like Best Makeup and Best Visual Effects, horror films aren't usually among the ...

Resources last updated: 12/8/2015 12:30:12 PM