ASP.NET and Javascript

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Harry

    #1

    ASP.NET and Javascript

    I have a couple of questions concerning both asp.net and
    javascript, if anyone could take some time to enlighten
    me on this I'd appreciate it a lot, and sorry if JScript
    is out of topic on this forum - in that case ignore this
    post.

    - Is there any way in javascript to retrieve the
    favorites from the user browser, so that they could be
    displayed on an .aspx page ? I know there's an easy way
    to add a link to the favorites list, but for obvious
    security reasons I guess there's no way to get access to
    the list itself.
    Could someone confirm/infirm my thought ? <- I could do
    this with a .net embedded control, but this requires File
    Access security permissions which I will not have, so
    javascript seems the only way to do this.

    - Second and last question, what is the best way to
    display an "uploading ..." message on a page ?
    My situation is as follows : the user is uploading from
    his local drive to the asp server, which is in turn
    uploading this to a web service. I fail to see a way to
    display the message during the upload from the client to
    the asp server (maybe with JScript ?), and creating a new
    page just to display the message during the asp->web
    service upload is not only cumbersome, it's also a pain
    to do since the client file is not accessible directly
    anymore and needs to be saved locally.

    Thanks a lot for any answer !
    Harry
  • Kevin Spencer

    #2
    Re: ASP.NET and Javascript

    Question 1: There is no way to do this with JavaScript. It would be
    invasive, to say the least.
    Question 2: You could put a hidden div on the page with the "Uploading"
    message. Then, attach a JavaScript function to the WebForm's "onsubmit"
    event that unhides the div. The page will remain in the browser window until
    a Response begins to come back. So, that should do it.

    And BTW, JavaScript is an almost-essential part of ASP.Net. So I would
    certainly think that questions about JavaScript, in connection with an
    ASP.Net app, are certainly appropriate here.
    --
    HTH,

    Kevin Spencer
    Microsoft MVP
    ..Net Developer
    All hotels in Benidorm. The best selection of Benidorm hotels with reviews and maps. Book in advance and save.

    Neither a follower nor a lender be.

    "Harry" <hxh@freee.fr > wrote in message
    news:0f7d01c361 a4$0918d8e0$a40 1280a@phx.gbl.. .[color=blue]
    > I have a couple of questions concerning both asp.net and
    > javascript, if anyone could take some time to enlighten
    > me on this I'd appreciate it a lot, and sorry if JScript
    > is out of topic on this forum - in that case ignore this
    > post.
    >
    > - Is there any way in javascript to retrieve the
    > favorites from the user browser, so that they could be
    > displayed on an .aspx page ? I know there's an easy way
    > to add a link to the favorites list, but for obvious
    > security reasons I guess there's no way to get access to
    > the list itself.
    > Could someone confirm/infirm my thought ? <- I could do
    > this with a .net embedded control, but this requires File
    > Access security permissions which I will not have, so
    > javascript seems the only way to do this.
    >
    > - Second and last question, what is the best way to
    > display an "uploading ..." message on a page ?
    > My situation is as follows : the user is uploading from
    > his local drive to the asp server, which is in turn
    > uploading this to a web service. I fail to see a way to
    > display the message during the upload from the client to
    > the asp server (maybe with JScript ?), and creating a new
    > page just to display the message during the asp->web
    > service upload is not only cumbersome, it's also a pain
    > to do since the client file is not accessible directly
    > anymore and needs to be saved locally.
    >
    > Thanks a lot for any answer !
    > Harry[/color]


    Comment

    Working...