|
|
Comments and Discussions
|
|
 |

|
Hi,
Would you please guide me through the steps of using the combobox and the files inside the zip to make it functional in my project. I added the MessageBoxUsc folder to my project, but I know I am missing something because it is not recognizing uscMsgBox1 or YaBu when it hits the line of code: uscMsgBox1.AddMessage("My message.", YaBu.MessageBox.uscMsgBox.enmMessageType.Info);
Any help will be appreciated...
Thanks,
Al
|
|
|
|

|
Im trying to use this i imported the project in visual studio and the project has lot of errors. The errors that i get is: uscMsgBox1 does not exist in the current context. And if i change the text of the messagebox like:
protected void btnAttention_Click(object sender, EventArgs e)
{
uscMsgBox1.AddMessage("test", YaBu.MessageBox.uscMsgBox.enmMessageType.Attention);
}
it still shows:
You must enter the user name.
???
But i changed some css properties and made it look good but what use is it when all this errors???
|
|
|
|

|
Hi,
the Yabu MessageBox in my project has a black background, making the msg text unreadable. The OK button is left aligned.
|
|
|
|

|
Hi,
have you the version of this in Visual Basic?
Please, this will be help me a lot
Regards,
Jorge
|
|
|
|
|

|
Hi,
It's a beautiful job at this point. I tried to use it as base for a msgbox server control, but didn't success. Do you plan to release one (no ascx, png embedded and over-ridable, ...) ?
|
|
|
|

|
Do you know what this is the first question i asked before a year when i begin learning ASP.NET.
But Now I have got the answer. I just submited an artcle with the name 'Confirm Message Box' that i guess it contains an answer to your question.
100
Help people,so poeple can help you.
|
|
|
|

|
Hi Yavuz,
Also thanks for the good work!!!
I am also new (3 days) to ASP.NET and did the 4 steps out of 5 you described in your answer to ronziv.
But I am not sure about step 5:
5. Drag and drop the control to the page that you want to give messages.
Could explain, which file to drag (uscMessageBox.ascx ?) and where to drop it?
Thanks
Gerhard
|
|
|
|

|
Dear Yavuz,
I can use you usercontrol but firefox is not display it well.
It appears 2 modalpopups (1 in the left for a few seconds, before it go to the center of the screen). I think you can use div position in css (-1000) for a hidden layer.
Thanks for a very good control.
|
|
|
|

|
Sorry, could not understand the problem and tried it in firefox but again could not understand see any problem again
Thank you very much for your advice, I am sure it will help somebody facing this strange problem.
|
|
|
|

|
Hi Man! Good Job, the component is nice. But!!
A version in VB.Net converted, doesn't work a ShowConfirmation. The button Cancel don't return a enum with Cancel information.
Do you can check this, please. I need so much this.
Thank You!!!
Bruno Vianna
ps: Sorry for poor english, i am brazilian and my english level is basic.
|
|
|
|

|
Hi brunovianna,
Sorry I did not get a notification email about the new messages.
I have checked the vb.net code and the problem is in the constructor method of the MsgBoxEventArgs class.
File uscMsgBox.ascx.vb
Lines 20-24 :
Public Sub New(ByVal answer As enmAnswer, ByVal args As String)
Answer = Answer
args = args
End Sub
this should be as
Public Sub New(ByVal answer_ As enmAnswer, ByVal args_ As String)
Answer = answer_
Args = args_
End Sub
As you know c# is case sensitive but vb.net is not. And this problem is caused during the conversion process from c# to vb.net
Thank you for your feedback.
|
|
|
|

|
Too many images, very less information
|
|
|
|

|
thank you
|
|
|
|

|
In this article I just wanted to share a ready to use usercontrol. It is not about hard algorithms or etc. You only need to know modal popup extender and event handling.
Common it is just a messagebox; google it, find it, look at to the images and .. after a short evaluation period leave it there or download and use it. Therefore there is lots of images-how it looks- and little explanation which is only about the usage.
Whatever...
execuse me but that is what I am able to do
|
|
|
|

|
Dear Yavuz Kucukpetek
You made a great work,thank you very much. I have tested the demo code. It is perfect when I use the AjaxControlToolKit version 3.0.20820.0, but It
doesn't work with the AjaxControlToolKit version 3.0.30512.1.
Can you tell me how should I do to make it work with the AjaxControlToolKit version 3.0.30512.1 ?
thanks again.
best regards,
Mike
modified on Friday, October 23, 2009 8:08 PM
|
|
|
|

|
sorry but couldn' t understand.
you want to work with version 3.0.30512.1 or 3.0.820.0?
|
|
|
|

|
Sorry, I have made a confusion. Your demo code use the ajaxcontrol tool kit.dll version:3.0.20820.16598. But currently my project use the Version:3.0.30512.20315.
When I use Version:3.0.30512.20315, then debug the page, show an
"Error 4 Could not load file or assembly 'AjaxControlToolkit, Version=3.0.20820.16598, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) C:\InfoManageSystem\MessageBoxUsc\uscMsgBox.ascx 1 "
Can you give me a demo sample code that use Version:3.0.30512.20315?
thank you very much.
best regards,
Mike
|
|
|
|

|
hi,
I have just used the sample project with both versions 3.0.30512 and 3.0.30930.28736 but didn' t see the 3.0.820.0 version in codeplex.
Here is the process of how to change the ajaxcontroltoolkit version
- Delete the toolkit reference from the project's references part,
- Delete the dll both in the root and bin directory
- Place the new dll in the root and then add reference to this dll by browsing in the Add Reference window
- For the last in web.config replace the existing add assembly line with the appropriate one below according to the version
<add assembly="AjaxControlToolkit, Version=3.0.30930.28736, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e"/>
<add assembly="AjaxControlToolkit, Version=3.0.30512.20315, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e"/>
I hope it helps, if it does not
- Clean the C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files directory by deleting the files folders
- Close all the browsers and execute gacutil /cdl command in the Visual Studio 2008 Command Prompt
|
|
|
|

|
I use AjaxControlToolKit version 3.0.30512.1, then build,show the error below,
Error 3 Could not load file or assembly 'AjaxControlToolkit, Version=3.0.20820.16598, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) C:\InfoManageSystem\MessageBoxUsc\uscMsgBox.ascx 1
can you update the demo code use AjaxControlToolKit version 3.0.30512.1. or Version=3.0.30930.28736 ?
thank you
modified on Friday, October 23, 2009 4:48 AM
|
|
|
|
|

|
Everything is done with the new version. You help me solve a big problem. Now I look at everything is nice.
Thank you very much! I vote 5, It's really a great job.
By the way, if There is a ajaxcontroltoolkit.dll with new version will be published in the future, Can I take place of the old one myself? If yes, I think this messagebox will be much better and more helpful.
|
|
|
|

|
got my 5.
Thanks for sharing
|
|
|
|

|
hi yavuz, good work do you also have the code in vb? pls share with us, thanks.
|
|
|
|

|
hi luperga,
I have just converted the attached project to VB.NET. But I cannot find how to add the new project
Does anybody know how to attach a new file, I think after some time the article becomes readonly ha ?
|
|
|
|
|

|
A very nice design, thank you for sharing your idea.
|
|
|
|

|
Nice work but it gives error "invokeViaServer method not found" while using master pages.
|
|
|
|

|
Hi habibsatti,
I have tried the usercontrol in a web content page but did not face to a problem.
Could you give some more detail also some code would be useful
|
|
|
|

|
Hi Yavuz Kucukpetek
Thanks for your reply, i have solved my problem basically it was not a master page problem.
|
|
|
|

|
Very nicely done.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|

|
Hi Yavuz,
Thank you for the good work!!!
I am new to ASP.NET and had difficulties using your message box utility (I created a web site project in VS 2008 for testing your utility)
Can you please explain, step by step how to integrate your message box in a web site project?
Thank you,
Ziv
|
|
|
|
|

|
Hi Yavuz,
Thanks for the quick response and for the help
I have done steps 1-4 and got the error message when compiling :
"Could not load file or assembly 'Pamukkale.WebControls' or one of its dependencies. The system cannot find the file specified."
Do you have any idea how to solve this issue?
BTW - i also added the folder App_Themes to the project (but it has nothing to do with the error msg, as i added it later).
Ziv
|
|
|
|

|
Hi Yavuz,
it's really a nice work. thanks...
|
|
|
|

|
Betaridi saghol sani Allah sani sakhlasin
|
|
|
|

|
The article and the solution proposed is good. I had previously done something similar using a seperate page for message and showing the page but it was a pain to invoke it. I mean, I had to write a lot of code to invoke the page and handling the result also required more coding. This is much clean and looks simple to invoke.
The article would have been even better had you shared more details about the class than just the output. I know that we can download the source and view the code but its always better if the author explains why s/he has made a particular choice.
BTW, I'm a little curious about how you made the prompts modal. As far as my Ajax experience goes ajax prompts can be ignored by clicking on the main page area. Im yet to check the sourcecode and wouldn't be able to do it anytime soon, hence posting this question.
Anyway congrats once again on a solution well done!! 4* from me.
|
|
|
|

|
Hi Dinesh Mani,
Execuse me for this little detailed article. But to say the truth, I prepared the sample application almost 2 months ago and could not post it because the lack of the article's itself.
My C# is better than my english; therefore, I changed my mind and said, I cannot deprive mankind of this messagebox because of a unwritten article
But you are right. I had better to write it more detailed.
After all, coming to your question. The modal pop-up namely the messagebox is modal with the help of the css classes.
Please look at the App_Themes\default\default.css file. There you will see /* Modal Popup CSS*/ part.
The css classes of .mpBg, .mp are responsible of the modalness.
The pnlMsg control in the uscMsgBox UserControl uses the css class of mp. And the actual actor of the being modal is the mpBg css class. And it is used by ModalPopupExtender mpeMsg's BackgroundCssClass.
|
|
|
|

|
I'll check the code at the earliest possible. Thank you!
|
|
|
|

|
This is really cool post.. Thanx
|
|
|
|

|
Hi Yavuz,
Just wondering what is the key advantage of proposed solution vs. simple javascript pop-ups like window.alert, window.confirm, window.prompt?
IMHO, using AJAX just for this purpose looks like a bit "overdo".
Kind regards,
Alex
|
|
|
|

|
Hi DrABELL,
You are right we can use alert, confirm, prompt functions. The reasons to this solution are;
- Apperance. As you know those pop-ups have a dummy apperance and you cannot change it.
- Look and feel The visitor can easily get the idea about the message. I mean it is an error or something else. According to my experiences when the users (especially the newbies) get a standart gray messagebox they think something bad happened, they broke down something
- Server side confirmation. As you see the control supports server side confirmation. Perhaps you can the same result by using window.confirm but it is client-side and you should add extra code to make it server side Also to handle the confirmation event is also a problem perhaps not a big one but a problem.
For example; assume that you want confirmation from the user repeatedly as
* Do you confirm to delete the user ? [<b>YES</b> | NO]
* The user has some pending transactions therefore he/she cannot be deleted. Do you want to delete the user and all the pending transactions ? [YES| NO]
* etc
You can handle this scenario just by a single handler.
<pre>protected void Page_Load(object sender, EventArgs e)
{
uscMsgBox1.MsgBoxAnswered += MessageAnswered;
}
protected void btnDelete_Click(object sender, EventArgs e)
{
uscMsgBox1.AddMessage("Do you confirm to delete the user ?", enmMessageType.Attention, true, true, "Step1");
}
public void MessageAnswered(object sender, YaBu.MessageBox.uscMsgBox.MsgBoxEventArgs e)
{
if (e.Args == "Step1")
{
if(e.Answer == YaBu.MessageBox.uscMsgBox.enmAnswer.OK)
{
bool hasPendingTransactions = bllUser.CheckTransactions(userId)
if(hasPendingTransactions)
{ uscMsgBox1.AddMessage("The user has some pending transactions therefore he/she cannot be deleted. Do you want to delete the user and all the pending transactions?", enmMessageType.Attention, true, true, "Step2"); return;
}
else{ // delete user}
}
else{ // nothing to do}
}
else if (e.Args == "Step2")
{
if(e.Answer == YaBu.MessageBox.uscMsgBox.enmAnswer.OK)
{
// delete user and all the transactions
}
else
{
// nothing to do
}
}
}</pre>
Of course we can find a similiar solution using window.confirm function but isnt this cool
As I said before enjoy it
Good bye
|
|
|
|

|
Hi Yavuz,
Thanks for your prompt response and rather detailed answer. True, aesthetic impression is an important factor.
Good luck!
Regards,
Alex
|
|
|
|

|
Nice Article.
|
|
|
|
|
|
 |
|
|
General News Suggestion Question Bug Answer Joke Rant Admin
Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.
|
MessageBox usercontrol that is AJAX ready and has confirmation support
| Type | Article |
| Licence | CPOL |
| First Posted | 14 Sep 2009 |
| Views | 79,485 |
| Downloads | 5,309 |
| Bookmarked | 107 times |
|
|