I need to get a server side button to run this client side code?

I need to get a server side button to run this client side code when the server

button is clicked and then subsequently called by the server.
Is it possible? The problem is that the print control is a client side activex.
I can call it normally using a client side button but this is no good when
I need to print more then one page.
Any help would be great.
Thanks.
The code:

function PrintProc(){
var MyPrinter;
MyPrinter = new ActiveXObject("ImgXPrint6.ImgXPrint");
MyPrinter.PageFrom = 1;
MyPrinter.PageTo = 1;
MyPrinter.PageMax = 1;
MyPrinter.PageMin = 1;
MyPrinter.Range = 1;
if (MyPrinter.ShowPrinter() == true)
{
MyPrinter.MarginLeft = MyPrinter.MinMarginLeft;
MyPrinter.MarginRight = MyPrinter.MinMarginRight;
MyPrinter.MarginTop = MyPrinter.MinMarginTop;
MyPrinter.MarginBottom = MyPrinter.MinMarginBottom;
var sinName = "<%= CurrentImage%>";
var sDocName = sinName.substring(0, 30);
MyPrinter.PrintImage(sDocName, document.all.ImgX.Images(0), false, true);
}
}
0
netdocs
11/11/2004 4:47:20 PM
asp.net.web-forms 93655 articles. 6 followers. Follow

1 Replies
1552 Views

Similar Articles

[PageSpeed] 48
Get it on Google Play
Get it on Apple App Store

Hi,

I think thiscan help you.
Leon Langleyben

MCSD, ASP.NET MVP

Blog
0
llangleyben
11/11/2004 4:54:29 PM
Reply:

Similar Artilces:

executing server side code and client side (javascript) code simultaneously while clicking a button
how to execute server side code and client side (javascript) code simultaneously while clicking a button in asp.net. You can't. When clicking a button: the client-side executes, the page does a PostBack, then the server-side executes.NC... what if i want to update a database and then open a new windows is it possible with Jscript.net?...

Firing both Client side event and server side event for server side button
I am having some difficulties getting this to work.. I have button_click (Asp.net) and ClientClick (Javascript).  Javascript is firing fine.  Server script is not. may be you have return return false in the in the javascript which is why its not firing server side event.You should add javascript evelt like thisbutton1.onclientclick = "functionname" Function should nopt return false. Vikram www.vikramlakhotia.comPlease mark the answer if it helped you...

get server side datetime but run at client side
How do I get the server side datetime eg( 4 Aug 2006  6:12 : 01(seconds) AM  ) which the time is something similiar to ticking clock, once it get the server side datetime, it will pass to the javascript. From javascript it will increment the second by one, it is just similiar to ticking clock, after 10 seconds it will synchronize to the server datetime which means it get the latest server side datetime.   Is there any guide ? thanks in advance!!!kiwi_cyh Hi, It seems you want to synchronize the time in client side display with the server. You can use asynchronous clie...

How to get the Client side values in server side code.
Hi all, i have a proble i need to get the client side javascript values in C# code at server side. how can i pass those values? i am using version 1.1, i kno thatwe can use callback events mechnisam in 2.0 or ajax ,apart from that how we can pass? My problem is i need to stop the execution of the code based on after reciving values from the client   any ideas please???   Million thanks RamCheersRam MCP Hello Ram, a common approach is from javascript set an hidden field, then issue a postback. On the server-side, handle the post-back. Feel free to go deeper in your que...

Client Side HTML Radio Buttons not Posting with Server Side Form
I have a server side form that is posting when an HTML client side button is clicked.  However, the value of my html client side radio button is null when I call Request.Form("htmlradiobuttonlist") on the resulting page.  Does anyone know why the form won't the post the value?  Please help!  Thanks in advance.I'm still using dot net 1.1.  I can use server side buttons or server side radio buttons.  I can explain why if necessary.Below, you can see the HTML radio buttons in the datalist.  The JS function works, but is omitted from below.<form id="form1" a...

client side code & server side code
what is the difference between client side coding & server side coding ? when to use client side & server side code? Client side code runs on the user's browser and includes languages such as javascript and vbscript. Server side code runs on the web server and can be written in languages such as ASP.NET, PHP, ASP, ColdFusion etc. Website Design Darlington - http://mdssolutions.co.ukhttp://lessthandot.com - Experts, Information, Ideas & Knowledgehttp://aspnetlibrary.com - An online resource for professional ASP.NET developersPlease remember to click "Mark as Answer...

How to execute server side code using VBscript bcz i need at client side.
How to  execute server side code using VBscript bcz  i need at client side.Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click Dim strSCript As String = "<script language=VBScript>Call load_LF()</script>" If (Not ClientScript.IsStartupScriptRegistered("clientScript")) ThenPage.RegisterStartupScript("clientScript", strSCript) End If End Sub here i am calling the vb script function i.e <script type="text/vbscript" language="vbscript"> sub load_LF() myclass....

Running javascript client side code from a web server control
Hi, I need to execute some client side javascript code from an asp.net server side control. For example, in an asp.net button server control I have code for server side click event and also code for onclientclick property. However, the code in the onclientclick property does not run. What is the correct way to execute javascript code from an asp.net server control? Regards, Sandyhttp://www.thequinn.infohttp://www.sksdataservices.comhttp://www.infobasket.info What you want to do actually? You can add attributes to the server control on page_load or use the ClientScript blocks. To add attr...

client side and server side code
Making things clear:When creating a web application one must know the difference between client side code and server side code.client side code is the code that is executed on the computer of the user. server side code is the code that is executed on the ....server.why is there client side code and server side code?well... server side code exist for the reason of sharing data with multiple users. for example: accessing a database.ASP.NET is a server side technology. in ASP.net you can use different languages such as VB.NET or C#.client side code is used to perform tasks on the computer of th...

How to Access/Pass Server Side Array Variable at Another Web Form's Client Side
Hi All,I struck up with some intrested senario at my application development...hope some body will guide me or sends me some code snippets....Thanks in advance.Senario is like this.....in A.aspx (using C# .net 2.0 as code behind) I am going to have a array variable basically it is an TWO Dimensional array after populating the values in array I need to redirect/ reload another web form B.aspx, here i need to access the array in B.aspx client side JavaScript.How can I do this...Thanks AgainRaju Dont do a redirect but use server.transfer. That way the previous page will still hold its value, ...

pls help: how to get client-side HTML "text field" value from a server side button
i copy some javascript from somewhere so user can choose pick up a date from a calendar and display the date onto a HTML text field. I have no knowledge in writing client side script(i.e. write code in html) can i write some code in a server-side button to get the value in the HTML text field??? i tried: Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click textbox1.text = document.getElementById("htmltext").value End Sub but "document" is highlighted, and say isn't declar yet. and...

How to Excecute Server side code in Client Side
I have a Textbox with linkButton on right side.  if i click linkbutton i have one text box agian in poup. if we enter some text and click search button i am showing ListView with searched data in Poup. the Listview contains one Radio Button at eash row. Now my request is if i select one radiobuton and click "OK"  the poup should close and display the selected row text in TextBox in my Page where the Linkbutton Presents. i can do it on my server side on "Okbutton_Click" . i wabnt to do this in Client side only with out PostBack.   Is ther...

Getting my client-side variable over to server-side
Ok so I have looked at a few posts on this subject and I can't quite figure out how to apply the idea to what I am doing here. I am using javascript to take amounts from 7 different textboxes and add them up on the fly, dropping the total in the 8th textbox. After they fill in that information they click button (postback) to continue throughout the form... what I need is for the "textboxTotalAmt" to move from client-side to server-side.  So I can access that total amount later in the form. Here is the Javascript piece... <script type="text/java...

Calling server-side code from client-side
Hi,  I´m implementing some shortcut functionality in my web forms and wanna know where i can find something that explains, for example, how to call the handler event "onclick" of a button. I´m using this library to add shortcuts to my controls: http://www.openjs.com/scripts/events/keyboard_shortcuts/   And I want to "link" some key combination for the event handlers of the controls. Does anybody knows?  Thanks. You could attach an AJAX event to the Javascript shortcut event handler so, for example, the shortcut function will trigger a button cl...

Web resources about - I need to get a server side button to run this client side code? - asp.net.web-forms

Server farm - Wikipedia, the free encyclopedia
A server farm or server cluster is a collection of computer servers usually maintained by an enterprise to accomplish server needs far beyond ...

Cock.li e-mail server seized by German authorities, admin announces
(credit: Vincent Canfield ) In a new video statement posted on Monday, the administrator of novelty e-mail provider cock.li announced that one ...

Amazon deal: Save $85 on this Sony portable wireless server
Smartphones' memory storage gets filled so quickly these days thanks to photos, videos and more, so get yourself a handy portable wireless server ...

Microsoft to change Windows Server 2016 licensing rules, will use per-core metric
Microsoft last week announced it will switch the licensing for next year's Windows Server 2016 to a per-processor-core basis, a move analysts ...

Applebee’s Server Returns $32,000 In Cash Family Accidentally Left On The Table
... and scored a huge tip from some abnormally generous person, and you figure the money is yours to keep. Or, if you’re like one Applebee’s server ...

FBI Director: Obama ‘Certainly’ Would Not Have Received A Briefing On Hillary’s Server Investigation
FBI Director: Obama ‘Certainly’ Would Not Have Received A Briefing On Hillary’s Server Investigation

Digitimes Research: Qualcomm to enter server market with 24-core CPUs
Qualcomm, which announced plans to begin developing ARM-based chips for servers in November 2014, has started delivering server-use CPU samples ...

Hillary Clinton's private server had two 'top secret' emails
Those concerns that Hillary Clinton's private email server had classified intel? They're apparently well-founded. Sources for Fox News and Politico ...

Rack Architecture, x86 Systems Helped Drive Q3 Server Growth
Third-quarter numbers from IDC and Gartner analysts show that the server space is growing, not only in terms of revenue but also in shipments. ...

Sources: Review affirms Clinton server emails were 'top secret,' despite department challenge
Sources: Review affirms Clinton server emails were 'top secret,' despite department challenge

Resources last updated: 12/22/2015 4:07:11 AM