[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

CMA

1/8/2003 12:25:00 PM

hi all,

is there a way to code some server script within client side script? im
coding client side with vbscript and serverside with C#. it is ok if sever
side with VB also. when i click a button will call to client side and will
popa message with alert("hello"). then within that i need to call a function
which is server side script with a parameter. how can i do it?

any help......???

CMA


2 Answers

(Scott Mitchell [MVP])

1/8/2003 6:12:00 PM

0

CMA wrote:
> hi all,
>
> is there a way to code some server script within client side script? im
> coding client side with vbscript and serverside with C#. it is ok if sever
> side with VB also. when i click a button will call to client side and will
> popa message with alert("hello"). then within that i need to call a function
> which is server side script with a parameter. how can i do it?

CMA, it sounds like you are a little confused as to the client/server
model ASP.NET uses. There is a physical (and temporal) disconnect
between the client and server script, so special "tricks" must be played
to have client script enact with server-side script. The "trick" being
rerequesting the Web page from the Web server in some fashion.

I would highly encourage you to read:

ASP Basics: What's Happening Back There?
http://www.4guysfromrolla.com/webtech/0823...

While it deals with ASP (not ASP.NET) the concepts hold for ASP.NET as well.

Once you read this article, think about it, and try to apply some of its
lessons, let me know and we can work from there. Thanks.

--


Scott Mitchell [MVP]
http://www.4GuysFro...
http://www.ASPMessag...
http://www.A...

* When you think ASP, think 4GuysFromRolla.com!

CMA

1/9/2003 4:02:00 AM

0

Thanks for it. i know it what happens in a asp page and i will explain what
is the actual requirement here bcos it will be helpful to you to give some
help....
when user clicks on a button in "first.aspx" page will save a file to
client's hard drive think as "c:\file.abc". then i need to copy the file to
server folder http://ip-address/temp/files/file.abc or save to a database.
when i upload the file to server's folder it require FILE component in the
page and user need to browser and load the file to upload. since i need to
do it as a background process(without user interaction), it cant be use. i
cant use database connections and save to it with client side scripts (bcos
i dont have the knowledge to do it). i can save a file to databse with
server side processing with C# or VB, it refer the path of the file from
server hard drive. how can i get the client's file reference in the server
side function.

CMA



"Scott Mitchell [MVP]" <smitchell@internet.com> wrote in message
news:TZYS9.55$_65.34@newssvr19.news.prodigy.com...
> CMA wrote:
> > hi all,
> >
> > is there a way to code some server script within client side script? im
> > coding client side with vbscript and serverside with C#. it is ok if
sever
> > side with VB also. when i click a button will call to client side and
will
> > popa message with alert("hello"). then within that i need to call a
function
> > which is server side script with a parameter. how can i do it?
>
> CMA, it sounds like you are a little confused as to the client/server
> model ASP.NET uses. There is a physical (and temporal) disconnect
> between the client and server script, so special "tricks" must be played
> to have client script enact with server-side script. The "trick" being
> rerequesting the Web page from the Web server in some fashion.
>
> I would highly encourage you to read:
>
> ASP Basics: What's Happening Back There?
> http://www.4guysfromrolla.com/webtech/0823...
>
> While it deals with ASP (not ASP.NET) the concepts hold for ASP.NET as
well.
>
> Once you read this article, think about it, and try to apply some of its
> lessons, let me know and we can work from there. Thanks.
>
> --
>
>
> Scott Mitchell [MVP]
> http://www.4GuysFro...
> http://www.ASPMessag...
> http://www.A...
>
> * When you think ASP, think 4GuysFromRolla.com!
>