|
In the code behind, all you have to do is:
[button name].click()
Pete Soheil
DigiOz Multimedia
http://www.digioz.com
|
|
|
|
|
You could use a javascript timer object to periodically refresh the page.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
solarthur01 wrote: I want this to be done periodically.
An elegant blend of JavaScript Timer and a XMLHttp should work charms here.
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|
|
i have a login page wid login check up loop as
if (userType.Equals("Administrator"))
{
Response.Redirect("successPage.aspx");
}
else if (!userType.Equals("Administrator"))
{
errMessage.Text = " Login Incorrect!! " ;
}
login works well..but if i click wrong details.. it displays nothing.. i want to display text above... how to do this ??
|
|
|
|
|
To Display Message Box - Response.Write(" alert('Loging Incorrect');");
|
|
|
|
|
Hi all!
I have a gridview with an imagebutton inside a templatefield
<asp:TemplateField><ItemTemplate>
<asp:ImageButton ID="Riepilogo" runat="server" CommandArgument="<%#((GridViewRow)Container).RowIndex%>"
ImageUrl="~/img/search.png"
CommandName="riepilogo" ToolTip="Riepilogo impianto"
onClick="prova" OnClientClick="src='img/blue_loader.gif'; Visible='True'"/>
</ItemTemplate></asp:TemplateField>
When i click that imagebutton, the onclientclick event changes the standard
image to a "waiting" animated gif.
The code for CommandName is something like that:
...
Response.ClearHeaders();
Response.Clear();
Response.AddHeader("Content-Disposition", "attachment;
filename=output.pdf");
Response.ContentType = myStuff.getAppSetting("ContentTypePDF");
Response.Flush();
Response.BinaryWrite(pdf);
Response.End();
...
This generates a PDF file that pops up for the download.
Now i have to change the image back to normal (not waiting). How do i
accomplish this?
Thank you in advance.
|
|
|
|
|
AFAIK once you have Response.End() then you can't do anything after that.
-----
|
|
|
|
|
Ok, so how do i accomplish the "wait for page" task?
|
|
|
|
|
Response.AppendHeader("content-disposition",
"attachment; filename=" + name);
by ths iam getting file down loadmessage as open, save cancel option by clicking the save option iam saving the file sucessfully in the client machine but now i want the path where the file was saved
|
|
|
|
|
You can't get it. The browser (rightfully, for security reasons) cannot access resources on the user's local machine. Why would you want this information anyway?
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
|
I have 2 webforms form1.aspx and form2.aspx. on form1 i have 2 buttons EDIT and NEW and on form2 i have SAVE and UPDATE .... I want to disable UPDATE button on form2 when i click NEW buttton on form1 and similarily i want to disable SAVE button when i click EDIT button in form1 . as EDIT buttton only should enable UPDATE and NEW should enable only SAVE
please ..Its Urgent !!
|
|
|
|
|
You should use the Session object or Cache to pass the information between the different forms.
As your example, there is two buttons called "Edit" and "New" on WebForm1. If the user clicks the "New" button, you wanna enable the "Save" button and disable "Edit" button on WebForm2.
then, write the following code in WebForm1
In btnNew_Click() event,
Session["IsNew"] = true;
In btnEdit_Click() event,
Session["IsNew"] = false;
In Page_Load() event of WebForm2 ~
<br />
btnSave.Enabled = Session["IsNew"];<br />
btnUpdate.Enabled != Session["IsNew"];
Note: You should check whether the session is already exist or not.. If this session object is not exist then you will get the error..
Hope it helps..
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
"Please vote to let me (and others) know if this answer helped you or not. A 5 vote tells people that your question has been answered successfully and that I've pitched it at just the right level. Thanks."
|
|
|
|
|
thanks for reply ..but i want both to happen i.e. if user clicks the "New" button, i wanna enable the "Save" button and disable "Update" button on WebForm2. and when user clicks EDIT button , i wanna enable Update button and disable Save button ..
few errors i got for previous reply
1)Operator '!=' cannot be applied to operands of type 'bool' and 'object'
2)Cannot implicitly convert type 'object' to 'bool'. An explicit conversion exists (are you missing a cast?)
3)Only assignment, call, increment, decrement, and new object expressions can be used as a statement
|
|
|
|
|
Please change like this below..
In Page_Load() event of WebForm2 ~
<br />
btnSave.Enabled = (bool)Session["IsNew"];<br />
btnEdit.Enabled = !(bool)Session["IsNew"];
OR
if (Session["IsNew"] == true){<br />
btnSave.Enabled = true; <br />
btnEdit.Enabled = false;<br />
}<br />
else{<br />
btnSave.Enabled = false; <br />
btnEdit.Enabled = true;<br />
}
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
"Please vote to let me (and others) know if this answer helped you or not. A 5 vote tells people that your question has been answered successfully and that I've pitched it at just the right level. Thanks."
|
|
|
|
|
hey thanx a lot thats working !!!
|
|
|
|
|
hi , i need ur help i m doing asp.net 2005 using C# , so i want 2 send emails automatically from database at a particular time. so what can i do this program ..plz..tell me..
thanks 2 all..
|
|
|
|
|
Rajeshwar Developer wrote: i want 2 send emails automatically from database at a particular time
You can use SQL xp_sendmail function to send a mail from SQL database.
Example ~
<br />
EXEC master.dbo.xp_sendmail <br />
@recipients=N'danw@Adventure-Works.com',<br />
@message=N'The master database is full.' ;
If you wanna run this code at a particular time, you can create the SQL-Job in database.
Hope it helps. Feel free to let us know if you still have the questions..
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
"Please vote to let me (and others) know if this answer helped you or not. A 5 vote tells people that your question has been answered successfully and that I've pitched it at just the right level. Thanks."
|
|
|
|
|
EXEC master.dbo.xp_sendmail how to create this sql job..
thanks 2 all..
|
|
|
|
|
You can create a job from T-SQL or design.. Please check-out the link below for more information.
http://technet.microsoft.com/en-us/library/ms186273.aspx
Hope it helps.
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
"Please vote to let me (and others) know if this answer helped you or not. A 5 vote tells people that your question has been answered successfully and that I've pitched it at just the right level. Thanks."
|
|
|
|
|
thanks brother...now i ll create a t sql job ..after that i ll ask u doubts..ok ...brother bye..take care..
thanks 2 all..
|
|
|
|
|
in stored pocedure , we know the no the variable that are declared into the sored pocedure.so in code behind we assign their values and send them to stored procedue.so we know how many variables , we have to pass.what if we have we don;t know .I mean can't i use the split function in stored procedure or it's alternative?
Yesterday is a canceled check. Tomorrow is a promissory note. Today is the ready cash. USE IT.
|
|
|
|
|
There is no build-in split function in SQL but you can create your own custom function.. You can google about this "SQL split function"
For example: A SQL Split Function
Hope it helps..
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
"Please vote to let me (and others) know if this answer helped you or not. A 5 vote tells people that your question has been answered successfully and that I've pitched it at just the right level. Thanks."
|
|
|
|
|
You Can Try This
Hope It is exact What u want.
<br />
Create FUNCTION [dbo].[fn_split] (<br />
@SourceString sql_variant,<br />
@Delimiter nvarchar(10) = N','<br />
)<br />
RETURNS @Values TABLE( Position smallint IDENTITY, cValue varchar( 8000 ) , ncValue nvarchar( 4000 ) )<br />
AS<br />
BEGIN<br />
DECLARE @NormalString varchar( 8000 ) , @NationalString nvarchar( 4000 ) ,<br />
@NormalDelimiter varchar( 10 ) , @NationalDelimiter nvarchar( 10 ) ,<br />
@IsNationalChar bit , @Position int ,<br />
@NormalValue varchar( 8000 ) , @NationalValue nvarchar( 4000 )<br />
SET @Delimiter = COALESCE( @Delimiter, N',' )<br />
SET @IsNationalChar = CASE<br />
WHEN SQL_VARIANT_PROPERTY( @SourceString , 'BaseType' ) IN ( 'char' , 'varchar' )<br />
THEN 0<br />
WHEN SQL_VARIANT_PROPERTY( @SourceString , 'BaseType' ) IN ( 'nchar' , 'nvarchar' )<br />
THEN 1<br />
END<br />
IF @IsNationalChar IS NULL RETURN<br />
IF @IsNationalChar = 0<br />
BEGIN<br />
SET @NormalDelimiter = @Delimiter<br />
SET @NormalString = CAST( @SourceString AS varchar(8000) )<br />
<br />
IF LEFT( @NormalString , LEN( @NormalDelimiter ) ) = @NormalDelimiter<br />
SET @NormalString = SUBSTRING( @NormalString, LEN( @NormalDelimiter ) + 1, 8000 )<br />
IF RIGHT( @NormalString , LEN( @NormalDelimiter ) ) <> @NormalDelimiter<br />
SET @NormalString = @NormalString + @NormalDelimiter<br />
WHILE( 1 = 1 )<br />
BEGIN<br />
SET @Position = CHARINDEX( @NormalDelimiter , @NormalString ) - 1<br />
IF @Position <= 0 BREAK<br />
SET @NormalValue = LEFT( @NormalString , @Position )<br />
SET @NormalString = STUFF( @NormalString , 1 , @Position + LEN( @NormalDelimiter ), '' )<br />
INSERT INTO @Values ( cValue ) VALUES( @NormalValue )<br />
END<br />
END<br />
ELSE IF @IsNationalChar = 1<br />
BEGIN<br />
SET @NationalDelimiter = @Delimiter<br />
SET @NationalString = CAST( @SourceString AS varchar(8000) )<br />
<br />
IF LEFT( @NationalString , LEN( @NationalDelimiter ) ) = @NationalDelimiter<br />
SET @NationalString = SUBSTRING( @NationalString, LEN( @NationalDelimiter ) + 1, 4000 )<br />
IF RIGHT( @NationalString , LEN( @NationalDelimiter ) ) <> @NationalDelimiter<br />
SET @NationalString = @NationalString + @NationalDelimiter<br />
WHILE( 1 = 1 )<br />
BEGIN<br />
SET @Position = CHARINDEX( @NationalDelimiter , @NationalString ) - 1<br />
IF @Position <= 0 BREAK<br />
SET @NationalValue = LEFT( @NationalString , @Position )<br />
SET @NationalString = STUFF( @NationalString , 1 , @Position + LEN( @NationalDelimiter ), '' )<br />
INSERT INTO @Values ( ncValue ) VALUES( @NationalValue )<br />
END<br />
END<br />
RETURN<br />
END<br />
Just Do IT™ [Information Technology]™ ;->
|
|
|
|
|
Hi,
I want to access the cells address of a gridview control on click or double click...
In Windows application with DatagridView it's quite easy..
How can i get the same in asp.net gridview control
Sangram
(A battle with self)
Life is simple, we are the ones makes the living difficult
|
|
|
|