|
Hi there you can try to register the a client side script @ runtime
try the code below:
string tmp = "";
tmp = "";
tmp += "alert('Quantity shouldn't exceed the Order Items');";
tmp += ";
Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "MyScript", tmp);
// and if u want to alert message for Exceptions
string tmp = "";
tmp = "
tmp += "alert('Exception :" + ex.Message + "');";
tmp += "";
Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "MyScript", tmp);
WaelA
Senior Software Engineer
abu_wer@hotmail.com
|
|
|
|
|
private void showMsg(string str)
{
Response.Write("alert('" + str + "');");
}
Call it like:
showMsg(ex.Message);
|
|
|
|
|
I am playing with the custom form designer example application posted here:
http://support.microsoft.com/default.aspx?scid=kb;en-us;813808
I extended the for tool box to include a 'SplitContainer' control, but the container fails to create the control. The failure occurs when the container calls
SplitContainerDesigner.Initialize(component).
The exception is {"Object reference not set to an instance of an object."}, which doesn't make sense since both the designer and component seem to be initialized properly.
I don't seem to be the only one having this problem. I saw a similar question posted here:
http://www.developmentnow.com/g/32_2005_9_0_0_602525/VS2005b2-SplitContainerDesigner--designer-Initialize-throw-an-exception.htm
Thanks
Aaron Stibich
|
|
|
|
|
Hi everyone,
Can anyone guide me thru this?
I'm quite bit confused with the ADO.NET connected & disconnected architectures
The working method is not the prob, but i just wanted to know the real SIGNIFICANCE of both.
ie, if connected Arch is better than disconnected arch, then why do we need disconnected arch in ADO.NET
Or Vice versa.
I hope u guys got me..
Thanks in advace.
"Nothing goes unknown, unless.... "
i think u know the answer
|
|
|
|
|
Disconnected architecture means that you retrieve the data and work with it without being connected to the database. Basically, this means that you aren't holding connection resources open, which makes applications much more scalable. If you are working on a web application, then you can't really work in any other way - it is impractical and undesirable to leave connections open in scenarios like this.
|
|
|
|
|
Hi man,
Thanx for the reply. But i hv one more query.
If disconnected architecture is more reliable and scalable than the connected one, then why do we need the Connected Arch? why does ADO.NET provide both of them..?
The name is Sandeep
|
|
|
|
|
You should use connected arch. for quickly reading data in a readonly manner (meaning each record is read one time and navigation to past records is not possible). Can be used to quickly fill controls, etc.
Using data readers def has its place and is very quick when used appropriately.
Any suggestions, ideas, or 'constructive criticism' are always welcome.
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison
|
|
|
|
|
thanks buddy. i think i got it somewhat clear.
kissdznuts wrote: Using data readers def has its place and is very quick when used appropriately.
can u please give a scenario in which the above said is satisfied..?
The name is Sandeep
|
|
|
|
|
A form could have a couple combo boxes that users cannot change the values of and each contains 50 items. You could use datareaders to very rapidly fill the combos. You might have to fill a collection or list object of some kind, you could initially fill the data quickly with a data reader.
You wouldn't want to use a data reader and between each read perform a ton of checks and toggling UI properties, etc because you're keeping the connection alive. You want to use data readers in operations were the reads are very quick and then close the connection.
Any suggestions, ideas, or 'constructive criticism' are always welcome.
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison
|
|
|
|
|
Hey there all, I'm just throwing this out there to see if anyone might have an idea on something to try:
I have recently developed a new Web User Control. This is not my first User Control, I have built many. The control itself does not seem to have issues. I and others in my office can compile and use the control just fine. Yay. However, we have an off site developer to whom I have sent the source code for the control. I did not leave anything out, any required JavaScript, CSS, all required files were sent with the control. However, when he attempts to compile his site with the control, he is getting compiler errors that would seem to indicate that he is not running the correct Framework version. For example, it will not compile with automatic properties (that is, properties that rely on the compiler to build their implementation and add the associated fields to the class), and also rejects methods that are specific to Framework 3.5 such as the Generically typed "ToArray()" method of the Generic List class that is provided as an extension through the System.Linq namespace in .Net 3.5.
I asked the developer to check his target Framework for the site. It is 3.5
I asked him to check which version of System.Core his site was referencing. It is, indeed, referencing version 3.5.0.0.
I made doubly sure that the code behind file for the control contains a using statement for the System.Linq namespace, it does.
The developer apparently did not have SP1 for VS2008 or .Net 3.5 installed but he has since installed the Service Pack.
Has anyone else run into an issue like this or have an idea for something else to try. At this point I am prepared to redevelop the control as a Web Server Control so that I can send it to him pre-compiled, but we are being pushed for a deadline so if there is some quick fix out there I'd love to try that first.
Thanks for any and all suggestions.
"We are men of action; lies do not become us."
|
|
|
|
|
Hi all,
How can I call MFC-dialog from managed code?
I tried to do this using platform invoke service but application core dumps because of assertions deep in MFC (because in this case I have no MFC's CWinApp running and so on).
Please advice.
Thanks
|
|
|
|
|
Which technology in .Net is equivalent to EJB?
|
|
|
|
|
What the heck is EJB?
Any suggestions, ideas, or 'constructive criticism' are always welcome.
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison
|
|
|
|
|
kissdznuts wrote: What the heck is EJB?
Enterprise JavaBeans.
"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
|
|
|
|
|
EJB is Java, .NET is Microsoft. Please elaborate more clearly what you are trying to find out. What exactly do you mean by technology equivalence between the two?
"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
|
|
|
|
|
I know I'm giving a dumb impression, but I've not used Java seriously. Anyway, have to ask: Isn't EJB more like a pattern than a pure technology. I know that there are API's that help you to encapsulate the business logic but the usage of these services is kind of an architectural question. Am I totaly lost (propably )?
The need to optimize rises from a bad design.
My articles[ ^]
|
|
|
|
|
Mika Wendelius wrote: I've not used Java seriously
Me neither. At least not since college over three years ago.
Mika Wendelius wrote: Isn't EJB more like a pattern than a pure technology. I know that there are API's that help you to encapsulate the business logic but the usage of these services is kind of an architectural question. Am I totaly lost (propably Smile)?
I'll admit I am not 100% sure. Looked at it a while back, then discover .NET and stuck with it.
"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
|
|
|
|
|
Paul Conrad wrote: then discover .NET and stuck with it.
That makes (at least) two of us
The need to optimize rises from a bad design.
My articles[ ^]
|
|
|
|
|
It's one of those amorphous technology things. Basically, there's a specification that says what EJB must be like and then there's a Container that hosts EJB.
|
|
|
|
|
Thanks! That explains a few issues I some time ago wondered, but never had the time to really investigate what's it all about. As I agreed with Paul: I found .Net and from there on life has been nothing but sunshine
The need to optimize rises from a bad design.
My articles[ ^]
|
|
|
|
|
I have some ex-Java lads working who couldn't believe who productive you could be in .NET. Now they won't go back.
|
|
|
|
|
I've encountered a few people who've done both Java and .NET and all prefer .NET. One said the Java world is more advanced in some ways but the .NET world is more productive with easier-to-use tools.
Kevin
|
|
|
|
|
Hi,
My company is developing a .NET 3.0 application, it uses another assembly called supportlibrary.dll, but this dll is an optional component for one set of customers. Still our company's application should work fine(other features).
I'm not sure how the design of this app should be, we are getting some exception, giving the same below
Type : System.IO.FileNotFoundException, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Message : Could not load file or assembly 'HP.ActiveSupportLibrary, Version=2.0.0.1, Culture=neutral, PublicKeyToken=01a974bc1760f423' or one of its dependencies. The system cannot find the file specified.
Source : SystemStatus
Help link :
FileName : HP.ActiveSupportLibrary, Version=2.0.0.1, Culture=neutral, PublicKeyToken=01a974bc1760f423
FusionLog :
Data : System.Collections.ListDictionaryInternal
TargetSite : Void .ctor()
Stack Trace : at HPAdvisor.Common.SystemStatus.HealthCheckSummary..ctor()
at HPAdvisor.Common.SystemStatus.HealthCheckSummary.get_Instance() in C:\HP Advisor\25Main200812112008\src\HPAdvisor\Shared\SystemStatus\HealthCheck.cs:line 176
at HPAdvisor.MyApp.OnStartServiceRoutine(Object sender, EventArgs e) in C:\HP Advisor\25Main200812112008\src\HPAdvisor\MainFrame\MyApp.xaml.cs:line 733
at System.Windows.Threading.DispatcherTimer.FireTick(Object unused)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
Additional Info:
MachineName : SSEBASTIAN
TimeStamp : 11/13/2008 5:58:08 AM
FullName : Microsoft.Practices.EnterpriseLibrary.ExceptionHandling, Version=3.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
AppDomainName : HPAdvisor.exeThreadIdentity :
WindowsIdentity : ASIAPACIFIC\sebastso
Inner Exception
---------------
Type : System.IO.FileNotFoundException, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Message : Could not load file or assembly 'HP.ActiveSupportLibrary, Version=2.0.0.1, Culture=neutral, PublicKeyToken=01a974bc1760f423' or one of its dependencies. The system cannot find the file specified.
Source :
Help link :
FileName : HP.ActiveSupportLibrary, Version=2.0.0.1, Culture=neutral, PublicKeyToken=01a974bc1760f423
FusionLog : WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
Data : System.Collections.ListDictionaryInternal
TargetSite :
Stack Trace : The stack trace is unavailable.
;200;Error;SSEBASTIAN;HPAdvisor.exe;672;C:\HP Advisor\25Main200812112008\bin\debug\HPAdvisor.exe;
11/13/2008 11:28:08.874;FATAL;(4);[7592];Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'HP.ActiveSupportLibrary, Version=2.0.0.1, Culture=neutral, PublicKeyToken=01a974bc1760f423' or one of its dependencies. The system cannot find the file specified.
File name: 'HP.ActiveSupportLibrary, Version=2.0.0.1, Culture=neutral, PublicKeyToken=01a974bc1760f423' ---> System.IO.FileNotFoundException: Could not load file or assembly 'HP.ActiveSupportLibrary, Version=2.0.0.1, Culture=neutral, PublicKeyToken=01a974bc1760f423' or one of its dependencies. The system cannot find the file specified.
File name: 'HP.ActiveSupportLibrary, Version=2.0.0.1, Culture=neutral, PublicKeyToken=01a974bc1760f423'
WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
at HPAdvisor.Common.SystemStatus.HealthCheckSummary..ctor()
at HPAdvisor.Common.SystemStatus.HealthCheckSummary.get_Instance() in C:\HP Advisor\25Main200812112008\src\HPAdvisor\Shared\SystemStatus\HealthCheck.cs:line 176
at HPAdvisor.MyApp.OnStartServiceRoutine(Object sender, EventArgs e) in C:\HP Advisor\25Main200812112008\src\HPAdvisor\MainFrame\MyApp.xaml.cs:line 733
at System.Windows.Threading.DispatcherTimer.FireTick(Object unused)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
I tried using
private bool ASLAvailable()
{
try
{
Assembly asm = Assembly.Load("HP.ActiveSupportLibrary");
if (asm != null)
{
return true;
}
else
{
return false;
}
}
catch (Exception ex)
{
//Log.Error(ex);
Log.Info("ASL Not available, returning false");
return false;
}
}
, but still getting error, as assembly binding happens much before
|
|
|
|
|
Have you checked that the assembly is listed in the environment PATH statement? I don't know that this is necessary anymore, but it used to be a common problem. Alternatively, since this is reported as a File Not FOund error, perhaps you can try reinstalling the library to correct any registry ommisions.
"A Journey of a Thousand Rest Stops Begins with a Single Movement"
|
|
|
|
|
Take a look at an IOC container such as Windsor.
|
|
|
|
|