|
If you are doing a post back you can use code like this:
NOTE you need:
using System.Text;
private void ShowMessageBox(string aMessage)
{
aMessage = aMessage.Replace(vbCrLf, "\\n").Replace("\"", "'");
StringBuilder myScript = new StringBuilder();
myScript.Append("<script>");
myScript.Append(Environment.NewLine);
myScript.Append("alert(\"").Append(aMessage).Append("\");");
myScript.Append(Environment.NewLine);
myScript.Append("</script>");
Page.RegisterStartupScript("TagMessage", myScript.ToString());
}
NOTE in .net 2.0 the call to registerstartupscript has changed.
If you are not doing a post back you have to use javascript.
Hope that helps.
Ben
|
|
|
|
|
im getting an error on tis code
|
|
|
|
|
Are you using .net 2.0? What is the error?
Ben
|
|
|
|
|
yes im using 2.0..n wats this vbCrLf,and the Page.RegisterStartupScript error...im using c#
|
|
|
|
|
ah, replace that with Environment.NewLine. Sorry about that.
Ben
|
|
|
|
|
hi..........
ex:-
if(TextBox1.Text!=null && TextBox1.Text!="")
MsgBox1.alert("Please input something in the text box.");
else
MsgBox1.confirm("Hello "+ TextBox1.Text +
"! do you want to continue?", "hid_f");
hope your prob. slove........
Imagine the I.T
|
|
|
|
|
|
|
Hi Developers
I have dirty URL like...
search.aspx?cat=cars&make=Honda&model=Accord
and I need to reWrite it in a better way like...
search/cars/Honda/Accord
How???
Lets work it Out.........!
|
|
|
|
|
|
Hi
have a look at this page http://msdn2.microsoft.com/en-us/library/fk49wtc1.aspx it is a string replace function. All you need to do is think carefully about your logic and it should help you.
Or have a look at some other string functions such as http://msdn2.microsoft.com/en-us/library/system.string.substring.aspx that you may be able to use to dynamically create the string.
I suggest you make a simple flow diagram outlining how the clean URL is made and then look at the System.String class and its members http://msdn2.microsoft.com/en-us/library/system.string_members.aspx
Hope this helps
Dan
|
|
|
|
|
halo...
can anyone tell me how to connect a textbox to a database.
i mean, when i enter smthg in the textbox it will save it in the database.
i'm quite new to this stuff, so if u don't mind, plizz teach me step by step...
|
|
|
|
|
hi there:
Just do a search from the uncle Google abt ADO.NET...you can start learning...how to interact with DB
Good luck
<< >>
|
|
|
|
|
Hi
in which platform u r doing c# or vb
|
|
|
|
|
Please help me
I have a GridView(Control)to display the information store in the table.I need to the user to have option to delete,Edit and View the information in each and every Row.How can I do that?
Thank you in advance
oga m
|
|
|
|
|
U can use template column and add appropriate buttons for view edit and delete
|
|
|
|
|
hi guys as the question says it
i wanna make a page that allows me to select the picture from my computer and upload it to an folder in the web host
any one know how?
|
|
|
|
|
|
You can use "FileUpload" control of Asp.net.
FileUpload1.SaveAS(Server.Mappath("Path"))
|
|
|
|
|
Hi All,
I'm trying to create excel and open it the same in IE but my requirment is bit different I've to create a dll which will do the creation.
Till now i've got code for creating excel from datagrid.
Is it possible to create excel at run time and then show the same in IE without using any control?
cheers,
Akhilesh Yadav
|
|
|
|
|
can someone plizzzz tell me step by step how to insert flash into asp.net??
|
|
|
|
|
hi there:
First, you should know how to insert flash object into html page flash in html,...then you can generate dynamically
<< >>
|
|
|
|
|
how can we keep the values in a password textbox field after the next refresh or till the final submit
|
|
|
|
|
if u r using ASP.NET(VB) then use a shared variable and everything assign it and C# then ur static..
|
|
|
|
|
Hi,
I am having a tool (windows based application, created in VB 6.0). I am having the SETUP file for that tool to get install in the desktop and use it (windows application).
Start-->Programs-->MyTool
How can I use this tool in my website? (I don't want this tool in my desktop anymore) All the inputs to this tool wil be provided using Web forms. The tool gets the Input , process it and returns the output in the web form itself.
Please let me know the logic behind this?
Regards,
Jay
|
|
|
|