|
hi all,i need a messagebox with yes or no buttons without using either script languages or popupwindow and i should able to catch the user input(ie.yes or no)
ayyp
|
|
|
|
|
Use the JavaScript-s prompt() function.
--------------------------------------------------------
My portfolio & development blog
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
i need this msgbox without using any script languages and popupwindows is it possible?
ayyp
|
|
|
|
|
No, I don't think it's possible simply because ASP.NET cannot run code on your machine. It is possible however to create a custom control that will have some javascript code in to launch a messagebox-like box. There are some nice articles about such controls on this website, check them out and see if they fit your need.
Talal
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning."
--Rich Cook
|
|
|
|
|
There is no way to make ASP.NET run .NET code on your PC. It has to pass by javascript, since it has to be done from the client-side.
Talal
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning."
--Rich Cook
|
|
|
|
|
Ayyp,
This is an article about popup windows in ASP.NET: http://www.codeproject.com/aspnet/asppopup.asp[^]
check it out and let me know.
Talal
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning."
--Rich Cook
|
|
|
|
|
I don't know if you can put buttons inside the control. I haven't tested it. Could you please send your replies to the forum instead of mailing them to me?
Talal
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning."
--Rich Cook
|
|
|
|
|
|
I dont think you find a solution for that. Why do you not interested in Script. You can also try www.visualwebgui.com/ they provide most windows controls to use in your asp.net Application. COOL! ha
-Syed Moshiur Murshed
|
|
|
|
|
hi syed i saw u r msg but i can't get into that site(to see the winform example) is it need to register to enter that site.
ayyp
|
|
|
|
|
and one more thing i need to run this popup or confirm or msgbox only after satisfying two condition (these all are in the same button click event.)when i use script it will run automatically when i click that button,but i dont want that, that box should be displayed only after satisfying condition and i should able to catch the user input that is yes or no like.if u have any code for my need pls send to me.....
ayyp
|
|
|
|
|
Hi all, I want to know that are there any functions like IsDigit and IsSymbol in C# wich let us know that any particular string contains any numbers or puncuation symbols....if they exist then wich r they.....and if they dont then how can we achieve this
Looking forward for help
Regards,
-- modified at 4:37 Saturday 20th May, 2006
|
|
|
|
|
Char.IsDigit, etc, work on a per char basis. I believe there are string based functions, but I have not found them as static methods on string.
You can of course use int.TryParse and double.TryParse to see if the value is an int or a double, respectively.
Christian Graus - Microsoft MVP - C++
-- modified at 4:47 Saturday 20th May, 2006
|
|
|
|
|
Hi,
I dont know about whether there is any in built function for your problem but you can implement this logic in your program by parsing the string character by character and knowing the ASCII codes for them. then compare the ascii codes for each character to be in range of for example numbers, characters or symbols. For this you will have to know the code ranges for numbers, symbols and alphabets in ASCII.
And for inbuilt functions try searching the msdn or msdn online at - http://mdsn.microsoft.com/library
A simple logic would be to convert the string into char[] and then loop in this array to check for Char.IsDigit and Char.IsNumber and Char.IsSymbol, etc....
(I found this after posting the message, so i modified the last post)
Anant Y. Kulkarni
-- modified at 4:45 Saturday 20th May, 2006
|
|
|
|
|
You should NEVER do this. You can use foreach on a string and use Char.IsDigit ( for example ). Using ASCII codes and assuming they are valid is a bad idea on a number of levels.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hi,
I havent got your point. Is there any way that the ASCII codes may be wrong? I think as you press the keys the ASCII codes are stored or sent to the program or what ever. but main point is ASCII is used for representing the characters. Means we used to do this in C. Is there any issues related to using ASCII values for comparisions. If yes, i would be greatfull to know. Also can you please elaborate on the point you replied to my post.
Christian Graus wrote: Using ASCII codes and assuming they are valid is a bad idea on a number of levels.
Number of levels? I hope you got my point.
Thanks
Anant Y. Kulkarni
|
|
|
|
|
Anant Kulkarni wrote: Is there any way that the ASCII codes may be wrong?
Well, for starters, they could be unicode codes. .NET is unicode by default.
Anant Kulkarni wrote: Means we used to do this in C.
Yep, I did it in C from time to time, although mostly I'd use the functions built in there, too.
Anant Kulkarni wrote: Number of levels?
As well as the Unicode issue, it's just a hack when the language provides stuff like Char.IsDigit.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Sir i have tried to do this in this way
foreach(char ch in docName.ToCharArray())
{
if(ch.IsDigit())
break;
}
but the problem is that this IsDigit and other r static methods so how can i access them
looking forward for help
Regards,
|
|
|
|
|
As it's a static method, you call it as I demonstrated, using the class name
if (Char.IsDigit(ch))
break;
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Thxx Sir, its working
|
|
|
|
|
I'm looking for an example how to write custom text edit control. Not a subclassed textbox but one that is written from the ground up.
|
|
|
|
|
Why do you need one ? I've looked and not found one in the past, but I got around the vagaries of the text box control ( namely that it draws itself out of the paint event ) with a bit of work.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Because I need to have a control over each line/paragraph etc. I want to make something like a custom text editor that outputs to a custom XML formats, depending on the context or the template. For now I cannot find any XML editor that can do what I need and I think the built in TextBox and RichTextBox controls won't do what I want to do.
This is what I want to do and the next thing that is independent of the above is that I want to see how text is handled in text editors and displayed on a form/control.
|
|
|
|
|
I have written one from complete scratch (iow painting every pixel). You can have a look at the source, but beware, the editor control alone is current almost 200kb (7000+ lines) in size. Follow either link below and see the link on the left of the page.
|
|
|
|
|
I know your control, leppie! Thank you! I was overwhelmed I hoped there was something simpler.
I much time have you spent researching, planning and creating it?
Have you ever thought writing an article about it?
|
|
|
|