|
George_George wrote: which writes video binary content back to browser client to invoke related media player
This is determined by the browser and not your ASP.NET application. ASP.NET can't invoke related media player on a client machine.
As CG said, this is wrong forum.
|
|
|
|
|
Thanks Navaneeth,
I will move to ASP.Net forum, let us move there.
regards,
George
|
|
|
|
|
hello all,
i have a c# window application form in which i have made options through the menustrip like file---> Open-----> New----> EXIT .... etc
here i have written the code this.close() for EXIT. and if i run the application and click the EXIT it will close the application
Now i want the same thing to be occured if i press ctrl+x through the Keybord.
How to code this in c#.
Thanks & Regards
TJS
|
|
|
|
|
As far as I know you can set the shortcut from the properties window in visual studio.
|
|
|
|
|
hello Giorgi Dalakishvili,
Thanks a lot
TJS
|
|
|
|
|
You are welcome
|
|
|
|
|
you can also use keydown envent
|
|
|
|
|
Why complicate things that Framework can handle itself?
|
|
|
|
|
Any recommendation for this?
|
|
|
|
|
If a method has no side effects, and fetches something in a fairly straightforward manner (it shouldn't read a database or something), yes, consider using a property instead.
Cheers,
Vıkram.
Stand up to be seen. Speak up to be heard. Shut up to be appreciated.
|
|
|
|
|
Hi Guys,
I want to write to event log with log4net eventlogappender, but could not get the output in event log. Below is my code snippets
<code>Creating root</code>
Hierarchy root=(Hierarchy) log4net.LogManager.CreateRepository("trial");
root.Configured=true;
root.Root.Level=log4net.Core.Level.Warn;
log4net.ILog log=log4net.LogManager.GetLogger("trial",root.Name);
log4net.Repository.Hierarchy.Logger loggerRepo=(log4net.Repository.Hierarchy.Logger)log.Logger;
<code>create layout</code>
log4net.Layout.PatternLayout objPatterLayout=new log4net.Layout.PatternLayout("Date:%d,Thread:[%t]");
<code>add appender to root after setting its properties</code>
EventLogAppender appenderEventLog=new EventLogAppender();
appenderEventLog.MachineName=".";
appenderEventLog.LogName="System";
appenderEventLog.ApplicationName="trial apps";
appenderEventLog.Layout=objPatterLayout;
appenderEventLog.ActivateOptions();
loggerRepo.AddAppender(appenderEventLog);
log4net.ILog log2=log4net.LogManager.GetLogger("trial",typeof(Form1).Name);
if(log2.IsErrorEnabled)
log2.Error("Error from trial apps");
if(log2.IsInfoEnabled)
log2.Warn("info from trial apps");
I use to get IsErrorEnabled as true, but cant see the output. I think I am missing Source, but there is no property to set the source.
Pls let me know, if I miss any properties.
thanx in advance.
Thanks,
Chintan(India)
|
|
|
|
|
Do you have enough permissions to write to event log?
|
|
|
|
|
Hi Giorgi,
Yes, I have full admin permission.
I try the same with .NET EventLog class which was working fine...
Thanks,
Chintan(India)
|
|
|
|
|
Hi,
I have created an entry in a custom event log:
if (!EventLog.SourceExists("TestSource"))
EventLog.CreateEventSource("TestSource", "System");
EventLog evtLog = new EventLog();
evtLog.Source = "TestSource";
evtLog.WriteEntry("This is a test", EventLogEntryType.Information);
I now decide to use my own custom log so I change "System" to "TestLog".
This doesn't do anything. The event is still logged to the "System" log even if I try deleting the source but if I use a different source, it then gets logged correctly to "TestLog"
if (EventLog.SourceExists("TestSource"))
EventLog.DeleteEventSource("TestSource");
If I go into the registry, I find a list of sources for the System event log but even if I delete the TestSource entry from there it still logs events to the System event log.
This MSDN article suggests that you can remove a source association from a log but it's not correct as far as I can tell:
http://msdn.microsoft.com/en-us/library/k57466fc(VS.71).aspx[^]
What's going on? It seems that once a source is associated with a log there's no way of removing that association.
|
|
|
|
|
Restart your machine...Hope it will work.
Thanks,
Chintan(India)
|
|
|
|
|
hello
Anyone done class property/attribute validation in C# (not ASP.NET but simimlar concept) using reflection? I'd avoid writing my own custom validator - anything out-of-the-box to do this?
Thanks
dev
|
|
|
|
|
Are you the only one who knows what's valid?
|
|
|
|
|
i am just hoping the kind of validator available to ASPNET is available for C# (or is it?)
dev
|
|
|
|
|
I don't know enough ASP.net to render an informed opinion.
|
|
|
|
|
devvvy wrote: Anyone done class property/attribute validation
What do you mean? Do you want to validate your business rules? If yes, here[^] is an excellent article on CP.
|
|
|
|
|
hey this is actually what I am looking for.
I was hoping there's something straight from dot-net framework though.
Thanks
dev
|
|
|
|
|
devvvy wrote: I was hoping there's something straight from dot-net framework though.
IDataErrorInfo is provided in .NET framework to create custom error information. That's what the article which I given refers.
Glad to know it helped
|
|
|
|
|
hello
I want derived class to automatically call a particular base class method BEFORE "return" statement, how can I do that?
class SomeDerived : SomeBase <br />
{<br />
...<br />
public SomeDerived() << Constructor called *After* SomeBase's constructor is invoked<br />
{<br />
...<br />
SomeMethod(); << This is what I plan to do, but I don't want burden of invoking this base class method to resides on Derived class (and at same time I can't put this on base class constructor because this must wait till Derived class finishes before invoking)<br />
return;<br />
}<br />
}<br />
<br />
class SomeBase<br />
{<br />
...<br />
SomeMethod();<br />
...<br />
}
Thanks!
dev
|
|
|
|
|
Other than making a factory method to do it, I don't think so. (Of course I could have simply misunderstood you too.)
|
|
|
|
|
You can't make it do it automatically. With MFC, you could use PostMessage, which would then cause the message to be sent when the current method had ended, but I don't believe C# supports anything like that, nor am I sure what would happen if you p/invoked PostMessage.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|