|
You can disable post back event validation
<pages enableeventvalidation="false">
|
|
|
|
|
I am generating a high resoulution image on the web server, which should be afterward downloaded onto users machine without displaying it in the browser and requiring user to make a right click and choosing "Save image as..."
What would be the best aproach to do it?
Sincerely
Marek
|
|
|
|
|
use this:
suppose ur image is at
http://www.abc.com/images/my_image.gif
or
C:\images\my_image.gif
use a link or link button with image url like:
function Message()
{
alert('Right click on link and save...');
return false;
}
Download Image Here
|
|
|
|
|
i think my html code is not showing properly it is:
function Message()
{
alert('Right click on link and save...');
return false;
}
<<aa href="http://www.abc.com/images/my_image.gif" onclick="return Message();">Download Image Here<
replace <<aa and="" <<="" a=""> with single
|
|
|
|
|
Thanks for help, but I actually do not want any user interaction, except for specifying name for data.
When I make response.redirect("myzipfile.zip") and point to a zip file, the dialog for saving data locally appears. This ist what I want to see when I redirect to an image file, istead of displaying it.
Marek
|
|
|
|
|
Hi there,
To force the Save As dialog box at the client side, you can use the Content-Disposition header field to send the image data from the server to the client side. You can simply google for "ASP.NET Content-Disposition " to get more info.
|
|
|
|
|
Hi,
I´m a really confused about what is the best way to maintain asp.net page state (viewstate, session, profiles):
Nr 1: are all objects destroyed when a page request has finished and returned the html/aspx page? If that’s the case it conveys that I have to re-create all objects when a new request is made and “re-fill” objects with values? Or?
Nr 2: What is the usual way to “save” a users state variables?
Regards
/Christoffer
|
|
|
|
|
For information that needs to tracked across multiple post backs
a) Use View State - If the information is tied to a single page &
If the information consists of fewer bytes
b) Use Profile - If the information represents specific to the logged user on the whole
rather than a page or group of page
c) Use Session - Information that needs to be tracked for the user, that applies to your
application on the whole again use session variables, again you may not want
more than few 100 bytes of information as part of session
d) Database - If you need to track information for ordering of records and if you have few
thousands records always re-request it from the database instead of storing it
in session variables
e) Cache - If information is common across all connected users.
|
|
|
|
|
hi,
if any one knows definition of print() function in javscript
please send the code.
thank you.
yog
hui gfgh kgdgrt njjn hjgkn
|
|
|
|
|
Button1.Attributes.Add("onclick", "javascript:window.print();") If this is what you are asking?
|
|
|
|
|
(Not aimed at you personally. )
I can't understand why everyone keeps adding that protocol in front of the javascript code. As the code isn't in an url it's not even used as a protocol, but is instead wrongly interpreted as a label.
Button1.Attributes.Add("onclick", "window.print();")
If you want a label in the code, why not use something more inspired?
Button1.Attributes.Add("onclick", "mailto:window.print();")<br />
Button1.Attributes.Add("onclick", "lpt1:window.print();")<br />
Button1.Attributes.Add("onclick", "dialog:window.print();")<br />
Button1.Attributes.Add("onclick", "code:window.print();")<br />
Button1.Attributes.Add("onclick", "todo:window.print();")
---
b { font-weight: normal; }
|
|
|
|
|
hi,
if any one knows definition of print() function in javscript
yog
hui gfgh kgdgrt njjn hjgkn
|
|
|
|
|
You mean window.print(); ?
Nila
"...for that, I will need a large cup of coffee and a brand muffin!" -Samantha Bea
|
|
|
|
|
|
I must have misunderstood you on print() function...
The "cup of coffee" comment refers to what a comedian said on The Daily Show With Jon Stewart on Comedy Central
Nila
"...for that, I will need a large cup of coffee and a brand muffin!" -Samantha Bea
|
|
|
|
|
I want to make a DIV element to be visible or not depending on the result of a method in the code behind file.it is not a problem if the page has been reloaded(I think I dont need AJAX).
I am too late but i will never give up
|
|
|
|
|
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
TestDiv.Visible = YourFunction()
End Sub
<div id="TestDiv" runat="server">any text !!!!</div>
hope i understod you
When you get mad...THINK twice that the only advice
Tamimi - Code
|
|
|
|
|
Thank you for your quick respond...
Your code is correct but the Problem is the web page Iam designing isnt added to the visual studio IDE (in the solution tree).Iam writing it out side Visual Studio.Net.But your code helped me to find a solution by using
protected System.Web.UI.HtmlControls.HtmlGenericControl divID;
To define the control in the code behind.
I am too late but i will never give up
|
|
|
|
|
Hi,
I would like to know how I can clear the data of a text file, using system.io (or something else) from a webpage.
At the moment I can create a file, and delete it, but I was told not to delete the file, but just delete all the data in the textfile when one pushes a button. Is this possible?
|
|
|
|
|
In whatever way you opened the file, open the file in write mode (with no append), don't write anything using the file stream or writer object, when you close the file object, the underlying file should be truncated with no data in it.
|
|
|
|
|
How can access SESSION variables from ASP.NET into Macromedia Flash 8.
Kunal Sagwaria
|
|
|
|
|
You can't. A session variable never leaves the server, and the flash is running on the client.
If you want to access the value from the session variable, you have to send it along in the page.
---
b { font-weight: normal; }
|
|
|
|
|
You cannot access Session variables directly, however you can make the session data available as GET / POST variables to your flash script.
|
|
|
|
|
iam using c# in asp.net iam using windows 2000 profess
in web.config file
<appsettings>
<add key="connStr"
="" value="server=(local);uid=sa;pwd=sa;database=Analysis">
when i am insertin values iam not able to connect
iam getting exception
System.Data.SqlClient.SqlException: Login failed for user 'sa'. at System.Data.SqlClient.ConnectionPool.GetConnection(Boolean& isInTransaction) at System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnectionString options, Boolean& isInTransaction) at System.Data.SqlClient.SqlConnection.Open() at Analysis.WebForm6.fillrecords()
plz let me know
with regards
|
|
|
|
|
THANKS BOYS
I GOT ANS
WITH REGARDS
|
|
|
|