473,545 Members | 2,004 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Server-side command included in javascritp inside codebehind??

al
Greetings,

I'm having a problem trying to execute server-side command included in
javascript inside codebehind file (VB.net).
'*****code sample
Button1.attribu tes.add("onclic k"," '" & <%response.writ e(""test"")%>
& "' ")

This gives me javascript error?!?!?!??

Any help with the syntax of such case???

MTIA,
Grawsha
Nov 18 '05 #1
3 1253
Hi,
Lose the response.write. Eg
Button1.attribu tes.add("onclic k", test)
for example
Dim test As String = "alert('test'); "
YourButton.Attr ibutes.Add("onc lick", test)

Cheers,
Jon

"al" <gr*********@ya hoo.com> wrote in message
news:66******** *************** ***@posting.goo gle.com...
Greetings,

I'm having a problem trying to execute server-side command included in
javascript inside codebehind file (VB.net).
'*****code sample
Button1.attribu tes.add("onclic k"," '" & <%response.writ e(""test"")%>
& "' ")

This gives me javascript error?!?!?!??

Any help with the syntax of such case???

MTIA,
Grawsha

Nov 18 '05 #2
You can't execute server commands from the browser. Read up on the difference between serverside and clientside programming. www.w3schools.com is a good place for javascript.

"al" wrote:
Greetings,

I'm having a problem trying to execute server-side command included in
javascript inside codebehind file (VB.net).
'*****code sample
Button1.attribu tes.add("onclic k"," '" & <%response.writ e(""test"")%>
& "' ")

This gives me javascript error?!?!?!??

Any help with the syntax of such case???

MTIA,
Grawsha

Nov 18 '05 #3
al
Scott Simons <Scott.Simons.A t.MealMagic.Com .Remove.This> wrote in message news:<AD******* *************** ************@mi crosoft.com>...
You can't execute server commands from the browser. Read up on the difference between serverside and clientside programming. www.w3schools.com is a good place for javascript.

"al" wrote:
Greetings,

I'm having a problem trying to execute server-side command included in
javascript inside codebehind file (VB.net).
'*****code sample
Button1.attribu tes.add("onclic k"," '" & <%response.writ e(""test"")%>
& "' ")

This gives me javascript error?!?!?!??

Any help with the syntax of such case???

MTIA,
Grawsha


Ok, what about this syntax(inside JS):

<%response.writ e(""test"")%> , or
<%response.redi rect(""main.asp x"")%>

I thought it is used for executing server side code????

Grawsha
Nov 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
4564
by: Phil | last post by:
I am using a Pascal like language (Wealth-Lab) on W2K and call this server: class HelloWorld: _reg_clsid_ = "{4E797C6A-5969-402F-8101-9C95453CF8F6}" _reg_desc_ = "Python Test COM Server" _reg_progid_ = "Python.TestServer" _public_methods_ = _public_attrs_ = _readonly_attrs_ =
6
4436
by: Nathan Sokalski | last post by:
I want to set up SQL Server on Windows XP Pro so that I can use the database capabilities of ASP and IIS. I am probably using some incorrect settings, but I am not sure what they are. Here is what I am currently doing: When I run sqlservr.exe I see the following: 2003-12-19 15:51:28.20 server Microsoft SQL Server 2000 - 8.00.760...
9
669
by: Grim Reaper | last post by:
My work let me put SQL Server 7.0 Enterprise Edition on my laptop. I have never setup a server from the beginning, so I am a little new at creating server groups. Alright, I am trying to create a server group. I right click on the "SQL Server Group" and make a name of "TEST" and put in the subgroup of "SQL Server Group". Next, I try to...
0
2796
by: Chris Halcrow | last post by:
Hi I've spent ALL DAY trying to re-install SQL Server 2000 on Windows XP. I continually get the error 'cannot configure server' just at the end of the installation. I've tried the following: - Removing SQL server from 'Program Files' folder following an unsuccessful attempt to re-install, and entirely removing the registry entry...
0
4523
by: Zorba.GR | last post by:
IBM DB2 Connect Enterprise Edition v8.2, other IBM DB2 (32 bit, 64 bit) (MULTiOS, Windows, Linux, Solaris), IBM iSoft Commerce Suite Server Enterprise v3.2.01, IBM Tivoli Storage Resource Manager Express Edition v1.3.2 Win, IBM Tivoli System Automation v1.2.0 Linux, IBM Tivoli Workload Scheduler Virtualized Data Centers v8.2 , other IBM...
22
3245
by: EP | last post by:
When running my asp.net hosting service (asp.net without IIS), on server 2003 with IIS not installed, I get the following when trying to process a request. "System.DllNotFoundException: Unable to load DLL (aspnet_isapi.dll)." Of course the dll is able to be found, it's still in the framework directory and for grins I even put it in my...
2
4904
by: Mike | last post by:
Hi, I am strugling with a simple problem which I can't seem to resolve. I have an asp.net page which contains a server-control (flytreeview, which is a kind of a tree to be exact). The tree is being updated by some other process through remoting. When the page loads, I init the tree, and in my browser I can see the initialized tree. The...
4
7293
by: coosa | last post by:
Hi, I was installing SQL Server on my machine and during installation my PC freezed. It happens frequently on my machine. So i tried after restarting to install it again and since then i always get the same error message: "An error occurred while creating one or more registry entries. Please see C:\WINDOWS\sqlstp.log for details. The...
1
6600
by: Peter | last post by:
I've purchased VS.NET 2005 Standard and have tried to install SQL Server 2005 Express, but get the following error in the error log. Please could someone help me.... Microsoft SQL Server 2005 Express Edition x86: Component Microsoft SQL Server 2005 Express Edition x86 returned an unexpected value. ***EndOfSession***? Microsoft SQL Server...
14
3005
by: Developer | last post by:
Hello All, i have recently installed VS2005 and was trying to install SQL sever 2000. I have Win XP' SP2. But when I tried installing, it only installed client tools and not the database. Can anyone please help me with this as I want to install SQL server and also wouold be grateful, if you can suggest me any workaround to dealwith this...
0
7415
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7675
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7440
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
1
5344
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
4963
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3470
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3451
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1030
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
726
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.