Showing posts with label print. Show all posts
Showing posts with label print. Show all posts

Saturday, March 31, 2012

Server Side Code dependent on JavaScript

Is there a way I can launch a Server Side function from JavaScript?

On a Button Click, I am using JavaScript to print to current page. When the print has been sent, I want to run a Server Side Function to update a record (which also changes the screen so I have to wait until it prints to run the server side function).

Thanks.I imagine in your JS function, you could print and then do a postback to the server?
This may get your problem resolved.

private void Page_Load(object sender, System.EventArgs e)
{
// Put user code to initialize the page here
Button1.Attributes.Add("onClick","javascript:DoSomething();");
string html = "";
html += "<script>";
html += " function DoSomething()";
html += " {";
html += " window.print();";
html += " }";
html += "</script>";
Response.Write(html);
}

private void Button1_Click(object sender, System.EventArgs e)
{
Update();
}

public void Update()
{
Response.Write("Now going to update the record.");
}
How to force a postback using javascript:

http://weblogs.asp.net/mnolton/archive/2003/06/04/8260.aspx

Monday, March 26, 2012

Server Side Word Application

I'm trying to create a server side application (through a web front end)
that allows me to print specific documents from the server
im using:
Dim wordapp = New Word.Application
and have added the word reference (and installed word on the server)
the problem i have is that when i run the above code i get an:
Access is denied.
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.
any help with this would be greatly appreciated as ive hit a brick wall with
things to try
thanks in advance
Mike FellowsIf you know the doc name and the location of the doc why open word, just
send the doc to the printer?
I'm doing the exact same thing but with PDF docs using BizTalk
"Mike Fellows" <mike.fellows.SPAM@.equityhouse.co.uk> wrote in message
news:nplvc.52$1d7.29@.newsfe3-win.server.ntli.net...
> I'm trying to create a server side application (through a web front end)
> that allows me to print specific documents from the server
> im using:
> Dim wordapp = New Word.Application
> and have added the word reference (and installed word on the server)
> the problem i have is that when i run the above code i get an:
> Access is denied.
> 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.
> any help with this would be greatly appreciated as ive hit a brick wall
with
> things to try
> thanks in advance
> Mike Fellows
>
I cant do that as i need to edit some bookmarks within the word document
otherwise it would be great
Mike Fellows
"Mike" <anonymous@.discussions.microsoft.com> wrote in message
news:uQpDFXKSEHA.1216@.TK2MSFTNGP10.phx.gbl...
> If you know the doc name and the location of the doc why open word, just
> send the doc to the printer?
> I'm doing the exact same thing but with PDF docs using BizTalk
>
> "Mike Fellows" <mike.fellows.SPAM@.equityhouse.co.uk> wrote in message
> news:nplvc.52$1d7.29@.newsfe3-win.server.ntli.net...
execution
> of
> information
> with
>
You can create ActiveX word object on client side and manipulate the bookmar
ks.
I just had the same with Excel.
I think that the solution is just to add a web.config file in the same
folder as your aspx with the code:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.web>
<identity impersonate="true"/>
</system.web>
</configuration>
"Mike Fellows" <mike.fellows.SPAM@.equityhouse.co.uk> a crit dans le message
de news:nplvc.52$1d7.29@.newsfe3-win.server.ntli.net...
> I'm trying to create a server side application (through a web front end)
> that allows me to print specific documents from the server
> im using:
> Dim wordapp = New Word.Application
> and have added the word reference (and installed word on the server)
> the problem i have is that when i run the above code i get an:
> Access is denied.
> 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.
> any help with this would be greatly appreciated as ive hit a brick wall
with
> things to try
> thanks in advance
> Mike Fellows
>
Thanks
i will give that a goo
Mike Fellows
"Franky" <fnappey@.lcf-com.removethis.com> wrote in message
news:uH7TLyKSEHA.3944@.TK2MSFTNGP11.phx.gbl...
> I just had the same with Excel.
> I think that the solution is just to add a web.config file in the same
> folder as your aspx with the code:
> <?xml version="1.0" encoding="utf-8" ?>
> <configuration>
> <system.web>
> <identity impersonate="true"/>
> </system.web>
> </configuration>
> "Mike Fellows" <mike.fellows.SPAM@.equityhouse.co.uk> a crit dans le
message
> de news:nplvc.52$1d7.29@.newsfe3-win.server.ntli.net...
execution
> of
> information
> with
>
Bin,
could you point me to a document explaining how to do this client side?
Thanks
Mike
"Bin Song, MCP" <anonymous@.discussions.microsoft.com> wrote in message
news:00924C08-9A8B-4A6C-B5E9-A1F58677A23A@.microsoft.com...
> You can create ActiveX word object on client side and manipulate the
bookmarks.
Franky,
this then opens word on the server, but it seems impossible to manipulate
i cant even set the word object to visible
Thanks
Mike
"Franky" <fnappey@.lcf-com.removethis.com> wrote in message
news:uH7TLyKSEHA.3944@.TK2MSFTNGP11.phx.gbl...
> I just had the same with Excel.
> I think that the solution is just to add a web.config file in the same
> folder as your aspx with the code:
> <?xml version="1.0" encoding="utf-8" ?>
> <configuration>
> <system.web>
> <identity impersonate="true"/>
> </system.web>
> </configuration>
> "Mike Fellows" <mike.fellows.SPAM@.equityhouse.co.uk> a crit dans le
message
> de news:nplvc.52$1d7.29@.newsfe3-win.server.ntli.net...
execution
> of
> information
> with
>
Please see:
HOWTO: Automate Excel from an HTML Web Page Using JScript
http://support.microsoft.com/defaul...kb;en-us;234774
Yes, I got the same problem with Excel.
The only solution I find (for Excel) is to install Excel 2003 instead of
Excel XP. And I posted a news concerning Excel XP...
"Mike Fellows" <mike.fellows.SPAM@.equityhouse.co.uk> a crit dans le message
de news:xEmvc.37$An.15@.newsfe6-win...
> Franky,
> this then opens word on the server, but it seems impossible to manipulate
> i cant even set the word object to visible
> Thanks
> Mike
>
> "Franky" <fnappey@.lcf-com.removethis.com> wrote in message
> news:uH7TLyKSEHA.3944@.TK2MSFTNGP11.phx.gbl...
> message
end)
> execution
wall
>

Server Side Word Application

I'm trying to create a server side application (through a web front end)

that allows me to print specific documents from the server

im using:

Dim wordapp = New Word.Application

and have added the word reference (and installed word on the server)

the problem i have is that when i run the above code i get an:

Access is denied.
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.

any help with this would be greatly appreciated as ive hit a brick wall with
things to try

thanks in advance

Mike FellowsIf you know the doc name and the location of the doc why open word, just
send the doc to the printer?
I'm doing the exact same thing but with PDF docs using BizTalk

"Mike Fellows" <mike.fellows.SPAM@.equityhouse.co.uk> wrote in message
news:nplvc.52$1d7.29@.newsfe3-win.server.ntli.net...
> I'm trying to create a server side application (through a web front end)
> that allows me to print specific documents from the server
> im using:
> Dim wordapp = New Word.Application
> and have added the word reference (and installed word on the server)
> the problem i have is that when i run the above code i get an:
> Access is denied.
> 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.
> any help with this would be greatly appreciated as ive hit a brick wall
with
> things to try
> thanks in advance
> Mike Fellows
I cant do that as i need to edit some bookmarks within the word document
otherwise it would be great

Mike Fellows

"Mike" <anonymous@.discussions.microsoft.com> wrote in message
news:uQpDFXKSEHA.1216@.TK2MSFTNGP10.phx.gbl...
> If you know the doc name and the location of the doc why open word, just
> send the doc to the printer?
> I'm doing the exact same thing but with PDF docs using BizTalk
>
> "Mike Fellows" <mike.fellows.SPAM@.equityhouse.co.uk> wrote in message
> news:nplvc.52$1d7.29@.newsfe3-win.server.ntli.net...
> > I'm trying to create a server side application (through a web front end)
> > that allows me to print specific documents from the server
> > im using:
> > Dim wordapp = New Word.Application
> > and have added the word reference (and installed word on the server)
> > the problem i have is that when i run the above code i get an:
> > Access is denied.
> > 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.
> > any help with this would be greatly appreciated as ive hit a brick wall
> with
> > things to try
> > thanks in advance
> > Mike Fellows
You can create ActiveX word object on client side and manipulate the bookmarks.
I just had the same with Excel.
I think that the solution is just to add a web.config file in the same
folder as your aspx with the code:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.web>
<identity impersonate="true"/>
</system.web>
</configuration
"Mike Fellows" <mike.fellows.SPAM@.equityhouse.co.uk> a crit dans le message
de news:nplvc.52$1d7.29@.newsfe3-win.server.ntli.net...
> I'm trying to create a server side application (through a web front end)
> that allows me to print specific documents from the server
> im using:
> Dim wordapp = New Word.Application
> and have added the word reference (and installed word on the server)
> the problem i have is that when i run the above code i get an:
> Access is denied.
> 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.
> any help with this would be greatly appreciated as ive hit a brick wall
with
> things to try
> thanks in advance
> Mike Fellows
Thanks
i will give that a goo

Mike Fellows

"Franky" <fnappey@.lcf-com.removethis.com> wrote in message
news:uH7TLyKSEHA.3944@.TK2MSFTNGP11.phx.gbl...
> I just had the same with Excel.
> I think that the solution is just to add a web.config file in the same
> folder as your aspx with the code:
> <?xml version="1.0" encoding="utf-8" ?>
> <configuration>
> <system.web>
> <identity impersonate="true"/>
> </system.web>
> </configuration>
> "Mike Fellows" <mike.fellows.SPAM@.equityhouse.co.uk> a crit dans le
message
> de news:nplvc.52$1d7.29@.newsfe3-win.server.ntli.net...
> > I'm trying to create a server side application (through a web front end)
> > that allows me to print specific documents from the server
> > im using:
> > Dim wordapp = New Word.Application
> > and have added the word reference (and installed word on the server)
> > the problem i have is that when i run the above code i get an:
> > Access is denied.
> > 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.
> > any help with this would be greatly appreciated as ive hit a brick wall
> with
> > things to try
> > thanks in advance
> > Mike Fellows
Bin,

could you point me to a document explaining how to do this client side?

Thanks

Mike

"Bin Song, MCP" <anonymous@.discussions.microsoft.com> wrote in message
news:00924C08-9A8B-4A6C-B5E9-A1F58677A23A@.microsoft.com...
> You can create ActiveX word object on client side and manipulate the
bookmarks.
Franky,

this then opens word on the server, but it seems impossible to manipulate
i cant even set the word object to visible

Thanks

Mike

"Franky" <fnappey@.lcf-com.removethis.com> wrote in message
news:uH7TLyKSEHA.3944@.TK2MSFTNGP11.phx.gbl...
> I just had the same with Excel.
> I think that the solution is just to add a web.config file in the same
> folder as your aspx with the code:
> <?xml version="1.0" encoding="utf-8" ?>
> <configuration>
> <system.web>
> <identity impersonate="true"/>
> </system.web>
> </configuration>
> "Mike Fellows" <mike.fellows.SPAM@.equityhouse.co.uk> a crit dans le
message
> de news:nplvc.52$1d7.29@.newsfe3-win.server.ntli.net...
> > I'm trying to create a server side application (through a web front end)
> > that allows me to print specific documents from the server
> > im using:
> > Dim wordapp = New Word.Application
> > and have added the word reference (and installed word on the server)
> > the problem i have is that when i run the above code i get an:
> > Access is denied.
> > 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.
> > any help with this would be greatly appreciated as ive hit a brick wall
> with
> > things to try
> > thanks in advance
> > Mike Fellows
Please see:
HOWTO: Automate Excel from an HTML Web Page Using JScript
http://support.microsoft.com/defaul...kb;en-us;234774
Yes, I got the same problem with Excel.
The only solution I find (for Excel) is to install Excel 2003 instead of
Excel XP. And I posted a news concerning Excel XP...

"Mike Fellows" <mike.fellows.SPAM@.equityhouse.co.uk> a crit dans le message
de news:xEmvc.37$An.15@.newsfe6-win...
> Franky,
> this then opens word on the server, but it seems impossible to manipulate
> i cant even set the word object to visible
> Thanks
> Mike
>
> "Franky" <fnappey@.lcf-com.removethis.com> wrote in message
> news:uH7TLyKSEHA.3944@.TK2MSFTNGP11.phx.gbl...
> > I just had the same with Excel.
> > I think that the solution is just to add a web.config file in the same
> > folder as your aspx with the code:
> > <?xml version="1.0" encoding="utf-8" ?>
> > <configuration>
> > <system.web>
> > <identity impersonate="true"/>
> > </system.web>
> > </configuration>
> > "Mike Fellows" <mike.fellows.SPAM@.equityhouse.co.uk> a crit dans le
> message
> > de news:nplvc.52$1d7.29@.newsfe3-win.server.ntli.net...
> > > I'm trying to create a server side application (through a web front
end)
> > > > that allows me to print specific documents from the server
> > > > im using:
> > > > Dim wordapp = New Word.Application
> > > > and have added the word reference (and installed word on the server)
> > > > the problem i have is that when i run the above code i get an:
> > > > Access is denied.
> > > 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.
> > > > any help with this would be greatly appreciated as ive hit a brick
wall
> > with
> > > things to try
> > > > thanks in advance
> > > > Mike Fellows
> >

Saturday, March 24, 2012

Server version of Windows XP

When I print out the Help files for an error, it says: "1. Make sure that
the Web server computer is running a server version of Windows 2000, Windows
XP, or Windows Server 2003.
At this point, I do not know if my PC is acceptable for programming Web
Applications.
Just exactly what does "a server version of Windows XP" mean? I have Windows
XP Professional w/SP2 and I have IIs and Front Page Extensions installed
using the "Add/Remove Components" and I have installed SQL Server 2000. Is
this enough for me to be able to create a Web Program in Visual Studio.NET
2003 Enterprise Developer Edition?
Thanks in advance for any help. JimIf your running XP Pro with IIS then yes you can create web apps by using VS
.NET 2003. I'm running XP Pro and creating web sites on my local box by
using VS 2003, and VS 2005 and I just installed VS 2008 as well. So you
should be able to.
"Jim Richards" <jimrichards@.satx.rr.com> wrote in message
news:4759a9b1$0$15348$4c368faf@.roadrunne
r.com...
> When I print out the Help files for an error, it says: "1. Make sure that
> the Web server computer is running a server version of Windows 2000,
> Windows XP, or Windows Server 2003.
> At this point, I do not know if my PC is acceptable for programming Web
> Applications.
> Just exactly what does "a server version of Windows XP" mean? I have
> Windows XP Professional w/SP2 and I have IIs and Front Page Extensions
> installed using the "Add/Remove Components" and I have installed SQL
> Server 2000. Is this enough for me to be able to create a Web Program in
> Visual Studio.NET 2003 Enterprise Developer Edition?
> Thanks in advance for any help. Jim
>
Yeah, I would translate that as "having IIS" enabled as well.
Which whacks something like XP-Home.
I can give others links to my local box..all the time, with XP Pro.
http://mymachine/SuperCoolWebApp/default.aspx
"Mike" <Mike@.community.nospam.com> wrote in message
news:%23mFEs6QOIHA.4948@.TK2MSFTNGP02.phx.gbl...
> If your running XP Pro with IIS then yes you can create web apps by using
> VS .NET 2003. I'm running XP Pro and creating web sites on my local box by
> using VS 2003, and VS 2005 and I just installed VS 2008 as well. So you
> should be able to.
>
> "Jim Richards" <jimrichards@.satx.rr.com> wrote in message
> news:4759a9b1$0$15348$4c368faf@.roadrunne
r.com...
>
I don't think the error message was well written. It means "server version
of windows 2000" or windows xp, or Windows Server 2003.
IIS on Windows XP works fine, but it only allows you to have one web site,
and there is a 10 connection limit. Ostensibly, this is to get you to pay
more money for a server OS.
-- Peter
http://www.eggheadcafe.com
http://petesbloggerama.blogspot.com
http://www.blogmetafinder.com
"Jim Richards" wrote:

> When I print out the Help files for an error, it says: "1. Make sure that
> the Web server computer is running a server version of Windows 2000, Windo
ws
> XP, or Windows Server 2003.
> At this point, I do not know if my PC is acceptable for programming Web
> Applications.
> Just exactly what does "a server version of Windows XP" mean? I have Windo
ws
> XP Professional w/SP2 and I have IIs and Front Page Extensions installed
> using the "Add/Remove Components" and I have installed SQL Server 2000. Is
> this enough for me to be able to create a Web Program in Visual Studio.NET
> 2003 Enterprise Developer Edition?
> Thanks in advance for any help. Jim
>
>
underprocessable

Server version of Windows XP

When I print out the Help files for an error, it says: "1. Make sure that
the Web server computer is running a server version of Windows 2000, Windows
XP, or Windows Server 2003.

At this point, I do not know if my PC is acceptable for programming Web
Applications.

Just exactly what does "a server version of Windows XP" mean? I have Windows
XP Professional w/SP2 and I have IIs and Front Page Extensions installed
using the "Add/Remove Components" and I have installed SQL Server 2000. Is
this enough for me to be able to create a Web Program in Visual Studio.NET
2003 Enterprise Developer Edition?

Thanks in advance for any help. JimIf your running XP Pro with IIS then yes you can create web apps by using VS
..NET 2003. I'm running XP Pro and creating web sites on my local box by
using VS 2003, and VS 2005 and I just installed VS 2008 as well. So you
should be able to.

"Jim Richards" <jimrichards@.satx.rr.comwrote in message
news:4759a9b1$0$15348$4c368faf@.roadrunner.com...

Quote:

Originally Posted by

When I print out the Help files for an error, it says: "1. Make sure that
the Web server computer is running a server version of Windows 2000,
Windows XP, or Windows Server 2003.
>
At this point, I do not know if my PC is acceptable for programming Web
Applications.
>
Just exactly what does "a server version of Windows XP" mean? I have
Windows XP Professional w/SP2 and I have IIs and Front Page Extensions
installed using the "Add/Remove Components" and I have installed SQL
Server 2000. Is this enough for me to be able to create a Web Program in
Visual Studio.NET 2003 Enterprise Developer Edition?
>
Thanks in advance for any help. Jim
>


Yeah, I would translate that as "having IIS" enabled as well.

Which whacks something like XP-Home.

I can give others links to my local box..all the time, with XP Pro.

http://mymachine/SuperCoolWebApp/default.aspx
"Mike" <Mike@.community.nospam.comwrote in message
news:%23mFEs6QOIHA.4948@.TK2MSFTNGP02.phx.gbl...

Quote:

Originally Posted by

If your running XP Pro with IIS then yes you can create web apps by using
VS .NET 2003. I'm running XP Pro and creating web sites on my local box by
using VS 2003, and VS 2005 and I just installed VS 2008 as well. So you
should be able to.
>
>
"Jim Richards" <jimrichards@.satx.rr.comwrote in message
news:4759a9b1$0$15348$4c368faf@.roadrunner.com...

Quote:

Originally Posted by

>When I print out the Help files for an error, it says: "1. Make sure that
>the Web server computer is running a server version of Windows 2000,
>Windows XP, or Windows Server 2003.
>>
>At this point, I do not know if my PC is acceptable for programming Web
>Applications.
>>
>Just exactly what does "a server version of Windows XP" mean? I have
>Windows XP Professional w/SP2 and I have IIs and Front Page Extensions
>installed using the "Add/Remove Components" and I have installed SQL
>Server 2000. Is this enough for me to be able to create a Web Program in
>Visual Studio.NET 2003 Enterprise Developer Edition?
>>
>Thanks in advance for any help. Jim
>>


>
>


I don't think the error message was well written. It means "server version
of windows 2000" or windows xp, or Windows Server 2003.

IIS on Windows Xp works fine, but it only allows you to have one web site,
and there is a 10 connection limit. Ostensibly, this is to get you to pay
more money for a server OS.
-- Peter
http://www.eggheadcafe.com
http://petesbloggerama.blogspot.com
http://www.blogmetafinder.com
"Jim Richards" wrote:

Quote:

Originally Posted by

When I print out the Help files for an error, it says: "1. Make sure that
the Web server computer is running a server version of Windows 2000, Windows
XP, or Windows Server 2003.
>
At this point, I do not know if my PC is acceptable for programming Web
Applications.
>
Just exactly what does "a server version of Windows XP" mean? I have Windows
XP Professional w/SP2 and I have IIs and Front Page Extensions installed
using the "Add/Remove Components" and I have installed SQL Server 2000. Is
this enough for me to be able to create a Web Program in Visual Studio.NET
2003 Enterprise Developer Edition?
>
Thanks in advance for any help. Jim
>
>
>