|
You're bordering on being flagged as abusive. Please ask clear, concise questions or else no one can help you. This is not the the place to ask for someone to do everything for you.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
I've inherited a project that for every uncaught exception is throwing up a message box with the exception message. These message boxes looks identical to those you can create using a JavaScript alert.
I want to exchange those pesky alerts with a proper logging and error page but I fail to find where they are coming from.
I've searched the solution for all the obvious (in my simple mind) search strings such as alert, message, register, clientscript and so on and have come up with nothing.
My conclusion is that I'm missing out something basic and probably is looking in the wrong places.
This is driving me up the walls.
<Edit>
I got stuck by trying to solve this backwards by searching for the alert.
I had a look at it again today and the answer is in clear text in the stacktrace. (If I had cared to try to understand it)
The exception is caught by a third party control that's propagating the exception to the client side where it is unhandled.
So now I just need to add a million Try/Catch for all those controls.
The lesson to learn is that if you don't find the answer you might be asking the wrong question.
</Edit>
Wrong is evil and must be defeated. - Jeff Ello
Any organization is like a tree full of monkeys. The monkeys on top look down and see a tree full of smiling faces. The monkeys on the bottom look up and see nothing but assholes.
modified 17-Nov-14 3:56am.
|
|
|
|
|
There are many, many ways to do popups. If it looks like an alert box then it probably is simply because they are ugly and I find it hard to believe someone would intentionally make their own look like alert.
So, search for "alert." But probably easier would be to debug the code, force an error, and step through to find where it is coming from.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
It's ugly alright, and it's differently ugly on IE, Chrome and FF which is another hint that it really is an alert box.
RyanDev wrote: So, search for "alert."
Done, but no cigar.
RyanDev wrote: force an error
That's the odd part. I've done exactly that, and VS catches the exception I'm throwing and when I try to step it simply throws the message box in my face.
Wrong is evil and must be defeated. - Jeff Ello
Any organization is like a tree full of monkeys. The monkeys on top look down and see a tree full of smiling faces. The monkeys on the bottom look up and see nothing but assholes.
|
|
|
|
|
I would search for the text in the message,
or search for "catch", maybe it's an ex.message.
Then go through the .js files,
I've seen message boxes created in jquery.ui, there is a popup module plugin that goes with it.
I use alert on $AJAX posts to a web service, where if the web service crashes, the ex.message is displayed, actually it's the HTML in that yellow error page but in text.
Sounds like it's a unpolished project, that needs lots of fixing.
|
|
|
|
|
Done, done, done.
jkirkerx wrote: Sounds like it's a unpolished project, that needs lots of fixing.
That would be an understatement, it's what's better known as a death march. It's wrapped up in more layers than an onion and it's giving you a headache just trying to follow the logics.
It was the brainchild of a consultant that's not getting any more jobs from us.
I've luckily not been overly involved until now.
Wrong is evil and must be defeated. - Jeff Ello
Any organization is like a tree full of monkeys. The monkeys on top look down and see a tree full of smiling faces. The monkeys on the bottom look up and see nothing but assholes.
|
|
|
|
|
Jörgen Andersson wrote: death march
Hmm.
I did a PHP project last year this time like that. The program was perfect till I got to the stuff written past 2007.
Ok, I get it now, what the done, done, done means
I'd have to see the web page in action to be of any more help, and look at the HTML source to narrow it down.
|
|
|
|
|
Are you sure it's not one of the other built-ins, like an prompt() perhaps
C# has already designed away most of the tedium of C++.
|
|
|
|
|
No, I'm certainly not sure as DOM and javascript is not my thing at all. So please keep them coming.
Oh, I just checked the solution, and there are no prompts anywhere.
I've also noticed that it's only affecting exceptions from one project/class library.
Any exception in any of the other projects and the web site itself is behaving normally.
Wrong is evil and must be defeated. - Jeff Ello
Any organization is like a tree full of monkeys. The monkeys on top look down and see a tree full of smiling faces. The monkeys on the bottom look up and see nothing but assholes.
|
|
|
|
|
Is it all code, or webform using asp.net objects
Is the Ajax Control Toolkit referenced?
|
|
|
|
|
It's a Website project using some Ajax functionality referencing seven class libraries.
It's only exceptions that's thrown or passing through one specific project that pops up an alert if the exception isn't caught.
Wrong is evil and must be defeated. - Jeff Ello
Any organization is like a tree full of monkeys. The monkeys on top look down and see a tree full of smiling faces. The monkeys on the bottom look up and see nothing but assholes.
|
|
|
|
|
Hi,
I have given value="" for the initial value of dropdown.For the remaining values i have given 0 and 1.When i didn't select any value from dropdown it stores 0 in database and when i select the first value from drop down list it stores 1 in database.Can anyone please help me with this.. 
|
|
|
|
|
What exactly is your question?
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
I have given
<asp:dropdownlist id="ddlStatus" runat="server">
<asp:listitem text="--Select--" value="--Select--" selected="True">
<asp:listitem text="Active" value="1">
<asp:listitem text="Non-Adrenalin" value="0">
When i select In-Active from dropdownlist it saves 2 in the database table.But i have given value as 0 for In-Active.How to solve this??
|
|
|
|
|
Thnx RyanDev.I got it. 
|
|
|
|
|
Please copy your code here for what you done to achieve this.
|
|
|
|
|
Thanx for your response.My code is
<asp:dropdownlist id="ddlstatus" runat="server">
<asp:listitem text="--Select--" value="--Select--" selected="True">
<asp:listitem text="Active" value="1">
<asp:listitem text="In-Active" value="0">
when i select "Active" from the dropdownlist, it saves the value '1' and for "In-Active" it saves '2' but i have given value '0' for In-Active.how to solve this? 
|
|
|
|
|
try below change in your code:
<asp:DropDownList id="ddlstatus" runat="server">
<asp:ListItem Text="--Select--" Value="" Selected="True" />
<asp:ListItem Text="Active"Value="1" />
<asp:ListItem Text="In-Active" Value="2" />
at code side you have to use Convert.ToInt32(ddlstatus.SelectedValue) to get selected options value.
|
|
|
|
|
I have already given "Convert.ToInt32(ddlstatus.SelectedValue)" in code side.If i give value 2 for In-Active means, it will save 2 in DB ryt....but i want to save value 0 for In-Active in DB. Plz help 
|
|
|
|
|
Thank you Dusara Maulik.I got it.
|
|
|
|
|
Selected.Index will give you 0,1,2,3
Selected.Value will give you "", "0", "1"
You should really use "--" for the Select Item Value, and then use the integers for actual values
And validate against "--" for the user to select something.
|
|
|
|
|
Thanks for considering my question.I got the answer
|
|
|
|
|
yes possible
you can check dropdowlist.selectedindex
EX: if(ddl.selectedindex==0)
value=0
else
1
|
|
|
|
|
i want to create a project on event reservation system asp.net using c#....
,so i want help from u that how can i create a best project????
,give me lots of ideas....
|
|
|
|
|
Step 0. Design out what you need.
Step 1. Write the code.
Step 2. Debug.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|