Discussion:
information bar and downloading a file --
cisco
2008-05-21 19:57:41 UTC
Permalink
I have a page where the user basically sets up a configuration. One of the
options for the user is that they can download a file based on this
configuration . What i'm doing right now is uploading the configuration
settings, using ajax and web services, in order to store int he server so
that the actual download request can be a simple url. so the callback for
the download link looks like [1] (without the gmail formatting :))

The problem with my initial approach is, in ie, the information bar pops up
to block the download. Once the user agrees he's fine but it's still an
annoyance i can live without.

The user can save this configuration beforehand but i don't want that to be
a requirement before they download a file. Another approeach is to have a
'prepare download' button that later notifies the user that his download is
ready.... but i don't like that approach either but at least i don't need to
save the configuration a database but i can instead rely on a session or
cache. -- something saved in server memory.

Thanks for any suggestions

[1]
function download() {

var success = function() {
location.href = "link.aspx?someid=3023923920392309230923093";
};
var failure = function(err) { alert( err.get_message(); };


get_proxy().SetupDownloadConfiguration(
buildConfigFromPage(), success, failure );

}

===================================
This list is hosted by DevelopMentorĀ® http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com
cisco
2008-05-21 20:01:47 UTC
Permalink
btw, the reason that the information bar comes up is because the
location.href is not contained within the button's onclick() event(per
msdn). Since i'm using ajax i can't synchronously, within the click event,
call location.href -- atleast not that i'm aware of
Post by cisco
I have a page where the user basically sets up a configuration. One of the
options for the user is that they can download a file based on this
configuration . What i'm doing right now is uploading the configuration
settings, using ajax and web services, in order to store int he server so
that the actual download request can be a simple url. so the callback for
the download link looks like [1] (without the gmail formatting :))
The problem with my initial approach is, in ie, the information bar pops up
to block the download. Once the user agrees he's fine but it's still an
annoyance i can live without.
The user can save this configuration beforehand but i don't want that to be
a requirement before they download a file. Another approeach is to have a
'prepare download' button that later notifies the user that his download is
ready.... but i don't like that approach either but at least i don't need to
save the configuration a database but i can instead rely on a session or
cache. -- something saved in server memory.
Thanks for any suggestions
[1]
function download() {
var success = function() {
location.href = "link.aspx?someid=3023923920392309230923093";
};
var failure = function(err) { alert( err.get_message(); };
get_proxy().SetupDownloadConfiguration(
buildConfigFromPage(), success, failure );
}
===================================
This list is hosted by DevelopMentorĀ® http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com
Mark Aurit
2008-05-28 13:38:59 UTC
Permalink
Im doing maintenance on a 2.0 app that has a gridview that consists of a
few boundfields and a commandfield.
Based on the value in one of the boundfields, I want to show a different
textual value for the link (not the header).

For example, I can do something like
if (e.Row.Cells[1].Text == "")
e.Row.Cells[2].Text = "Add" //Cells[2] is CommandField
else
e.Row.Cells[2].Text = "Modify"

The problem is that code correctly sets the text, but the value is no
longer hot, its just text.

As best as I can tell, I want to modify the CommandField's HeaderText
SelectText atribute, but I cant figure out how to do this.

Thanks much!
Mark

===================================
This list is hosted by DevelopMentorĀ® http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com
Continue reading on narkive:
Loading...