|
You need to do it through AJAX concept...
Koushik
|
|
|
|
|
Can you give some sample codes
|
|
|
|
|
Look into google for AJAX tutorials...
Take a look into this..AJAX[^]
Koushik
|
|
|
|
|
Yeah, its weird. It was working just fine before, but after a recompile (no changes to code, mind you), this.Master (or Page.Master, same thing) returns a null. Whats more weird, if I hover the mouse over where I use this.Master, ir returns teh corect thing. However, when I step through the line where I use it, or read its value into a variable, it equals null. Could anyone shed some light on this, or is it completely FUBARed?
Thanks,
Anton.
|
|
|
|
|
Hai all,
HEre i had a problem with message box.When i want to display some message,it is showing msgbox.Means i am able to show the message, and here my problem is----
i have to Redirect to the perticular Form while clicking on OK.(with Response.Redirect("a.aspx"))
Is it possible to do in that manner?
My code for msgbox is
Public Sub ShowMessageBox(ByVal msg)
Dim str As String
str = "alert('" + msg + "');"
Page.RegisterStartupScript("showmsg", str)
End Sub
Please any one understand the problem and respond to my forum.
Is it possible or not,otherwise which procedure i have to approach???How to do in asp.net????
Thanks in advance
kissy
|
|
|
|
|
Just add window.location='a.aspx'; to the code.
---
single minded; short sighted; long gone;
|
|
|
|
|
Hai Guffa,
Thanks for ur reply.
WE are doing webbased application.It is not accepting window.location etc.
Where i have to givethis code??on the pageload????
My problem is i have to initilize the project,if any one directly go to the further forms,i have to display the message,And on that msgbox,by clicking on OK he ss redirecting to the first form.
How to do???Please give me correct solution???
Thanks once again.
kissy
|
|
|
|
|
Hi,
You need to add this in the javascript like....
str = "alert('" + msg + "');window.location='a.aspx';"
|
|
|
|
|
Hai Guffa and Sandeep,Thanks for your answer.It is working perfectly,\Thanks once again.
And can you give me an idea for ,If i click on OK it has to perform some action and if we click on Cancel,it has to perform other action.
How to check which one(OK or Cancel)was selected????
Give me some idea.
thank you
kissy
|
|
|
|
|
Hi,
You will not be having Cancel button for Alert, if you want to have OK And Cancel buttons u can use "confirm" Dialog box..
Eg:-
if(confirm("Your Text to display"))<br />
{<br />
}<br />
else<br />
{<br />
}
Regards
Sandeep Kumar.V
Regards,
Sandeep Kumar.V
|
|
|
|
|
hai sandeep,
This is code for my confirm message box.
Button1.Attributes.Add("OnClick", "javascript:return confirm('Are you sure');")
but as per your code ,how to give the if condition,
It is not accepting confirm("some text")???
how to give and where,on the button click event or somewhere???
eventhough it is small i am confusing.
Once again thanks for ur reply
Correct my code please
kissy
|
|
|
|
|
Hi
Replace this in your code and try it is working fine...
Button1.Attributes.Add("onClick", "javascript:if(confirm('Check text')){alert('ok')}else{alert('Cancel')}");
Regards,
Sandeep Kumar.V
|
|
|
|
|
hai sandeep,
Your code is sufficeient to display and confirm something,but how to check if it si ok or cancel.
i want to again display some msg on OK click,and same for cancel,or sometimes i want to redirect some other page( when it is confirm msgbox only),Please dont get irritate and tell me .i have tried.but it is not giving anything.
thanks once again
Regards
shakeena
kissy
|
|
|
|
|
Hi Kissy,
Button1.Attributes.Add("onClick", "javascript:if(confirm('Check text')){alert('ok')}else{alert('Cancel')}");
In the above code i placed confim dialog box in if condition it means whenever you click on Ok it returns true so it executes the code after the if condition statemts.
if the user clicks on cancel button it execute the statements followed by else statement.
so in that way whatever you want you can place your code in that if condition followed statements.
In the above Code if the user clicks on OK it display an alert dialog box saying OK simillarly if he clicks on Cancel u will get a alert dialog box saying Cancel.
Regards,
Sandeep Kumar.V
|
|
|
|
|
if ur using asp.net2.0 using c#
include the header file
using System.Windows.Forms;
now u can show the megs using theis code
DialogResult msgrslt = MessageBox.Show("Do You Want To Save The ata", "SAVE", MessageBoxButtons.YesNo);
if (msgrslt == DialogResult.Yes)
{
//code for save
}
![Rose | [Rose]](https://codeproject.global.ssl.fastly.net/script/Forums/Images/rose.gif)
|
|
|
|
|
You should reply to the original post instead of replying to my post.
However, this is the ASP.NET forum. You can't use the message box from Windows.Forms in an ASP.NET application.
---
single minded; short sighted; long gone;
|
|
|
|
|
in asp.net the header file s tere try...im using it
|
|
|
|
|
No, it doesn't work. The message box is shown on the server, not on the client computer. While you are testing the application using your own computer as server, you will see the message box. When you deploy the application to a web server, there is no user interface for the process running the application, so the message box have nowhere to go.
---
single minded; short sighted; long gone;
|
|
|
|
|
we are using the tool visual studio 2005 webdeveloper express edition,
are you sure it doesnt work in server,because i have no way to test it right now.
-- modified at 4:51 Wednesday 9th May, 2007
|
|
|
|
|
regimol wrote: v r r u bz hav rgt nw.
Plese try to write proper english. It's just a few more keystrokes, and it makes the message so much easier to read.
regimol wrote: r u sure it doesnt work in server
Absolutely.
---
single minded; short sighted; long gone;
|
|
|
|
|
Hi to all, I want to know how to encript and decript my connectionstring inside the web.config file
Mkanhha
|
|
|
|
|
refer to the System.Security.Cryptography namespace
<< >>
|
|
|
|
|
Thanks for your replay. If you have some examples, Please Post it
Mkanchha
|
|
|
|
|
|
Thanks for your Reply. But I am Not Getting my answer from that URL. If you have another examples or code please paste it
Mkanchha
|
|
|
|