|
Try Session.Abandon();
This should destroy data related to the session.
BTW, this is the C# forum.
Try posting in the ASP.Net forum next time onwards....you have better chances of getting a propert answer.
|
|
|
|
|
Well, Because I guess, it couldn't done in ASP.Net, I've written it in C# forum.
AFAIK Session.Abandon(); expire current session ! I wanna expire a session with session id
|
|
|
|
|
If I were doing this, I would use SessionIdManager[^] as a base. Basically, I would inherit from this and implement my own session management.
|
|
|
|
|
Hi, i am working on a project named object tracking in video files as part of my academics.
I used "A Simple C# Wrapper for the AviFile Library" for working with Avi Files.
It is working well in my system for my inputs and getting output as expected.
My system configuration
os: windows 7
.net version: Visual studio 2010(version 4)
And when i tried to run the same code on different system with same
configuration as mine it is not working.
and also i tried to do with different configuration as shown below.
os: windows XP Service pack 2
.net version: Visual studio 2008 (version 3.5)
it is also not working.
no errors.
no warnings.
I'm getting exception showing "process or thread has changed since last step"
exception at
" if(getFrameObject == 0){ throw new Exception("Exception in
VideoStreamGetFrameOpen!"); }" in VideoStream.cs file.
I'm not getting the solution what changes i've make to run the code on
other system.
|
|
|
|
|
Please restate your question more clearly. First you say "no errors, no warnings," then you say you're getting an exception.
Also, "it is not working" doesn't tell anything useful. Give details.
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
the problem is stated as follows.
I developed a my academic project named as object detection and tracking in video files.
I used "A Simple C# Wrapper for the AviFile Library" available in codeproject site only.
It is working well in my system.
I'm getting output in my system.
and I took the code from my system and installed in other system of my educational institution.
It is not executing.
I'll get front end and stops executing there itself without showing the input video.
I'm getting exception as Exception in VideoStreamGetFrameOpen
at line
" if(getFrameObject == 0){ throw new Exception("Exception in VideoStreamGetFrameOpen!"); }"
in VideoStream.cs file.
showing "process or thread has changed since last step" when i went on debugging step by step in a blue dot indicating at the above stated line of code.
I'm not getting the solution what changes i've make to run the code on
other system.
Is that video codec problem or some other??
|
|
|
|
|
helloww!!
i can't find all the codes (all functions of event handler of every type,i.e. button,listBox,etc., all functions of this types) can u please provide me the links where i can find all thes codes!!
thnxx
|
|
|
|
|
Sure, take a look at MSDN and read through the various help pages. They are all there.
|
|
|
|
|
Here are the most important codes:
483 498 379 531 478 239 943 438
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
42
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
There is no single page which holds a list of Events for all controls - there are just too many of them.
Instead, they are (as Pete said) all available on MSDN, but listed under the individual control.
For example, the Button class description[^] lists all teh properties, methods and events which are applicable to a Button, while the TreeView class description[^] does the same for the TreeView.
Decide what type of user interface control you want to use, then search Google for "Button class MSDN" or "ListView class MSDN" and you will normally find the page at the top of the list.
Ideological Purity is no substitute for being able to stick your thumb down a pipe to stop the water
|
|
|
|
|
hi
How to make the windows form that can Zoom out-in (something like Image that have zoom in and out without any changes to it)
|
|
|
|
|
Google is your friend: Be nice and visit him often. He can answer questions a lot more quickly than posting them here...
A very quick search gave over 300,000 results. A very quick look at the first page of these gave complete code and tutorials!
http://www.dotnetcurry.com/ShowArticle.aspx?ID=196[^]
In future, please try to do at least basic research yourself, and not waste your time or ours.
Ideological Purity is no substitute for being able to stick your thumb down a pipe to stop the water
|
|
|
|
|
Handle the mouse wheel events ..
|
|
|
|
|
What are you trying to accomplish exactly? Do you want to make all of the controls on the form larger or smaller? Do you just want the size of the form to get larger or smaller? Are you trying to use the form as an image viewer and zoom the image in/out?
|
|
|
|
|
Hi All,
I have created an object book which is as follows
public class book
{
public string bookname;
public string bookauthor;
public string bookprice;
}
public class books:List<book>
{
}
now on the load of the page i get some book details stored in the database and add them to the "books" object and also I add a empty book object to the books so which can be used by the users to add one new book.
I then bind this to a datagrid on the aspx page with template columns.
Books books = new Books();
books=Books.getBooks(); //also adds on blank book object
dgbooks.datasource = books;
dgbooks.databind();
on click of the save button i require the datasource to be type cast as books object. I am trying to do this on the click event of the save button
books = (Books)dgbooks.datasource;
but this is not working because the datasource is entry. Because during the postback it is wiped off. Can someone please help me to come around with this one?
The above code is just a sample code.. hence please ignore the mistakes.
Jack Sparrow
--------------------------------------
Defeat is not the worst of failures. Not to have tried is the true failure.
|
|
|
|
|
It's not "wiped out", it's just not set yet because the page is still loading. The asp.net events are a bit of a mess. You should try to get the books in the Load or LoadComplete events. And you should also check if you have EnableViewState set to false.
|
|
|
|
|
Can anyone help me how to retrieve the below computer event statistics on a network, i.e. The exact time computer gets logged on, logged off, locked, unlocked, remote logged on etc, also the user name who is responsible for events..
Also this should work on windows OS(XP/Server/7).
If this can be done through WMI, please let me know how...
Thanks!
|
|
|
|
|
Windows doesn't track any of this information, so no, you can't do it the way you're thinking. There are no "events" for this kind of stuff.
You'd have to write a client you install on every workstation you want to track to do this.
Since you're supporting Windows XP, what you do will be different than it will be for Vista/7.
Most of this information you can poll from the Terminal Services API, like here[^].
|
|
|
|
|
This can be achieved by using Win32 API. Create a method and add a Hook to get the windows notifications including logon, logoff, locked, unlocked etc.
So if you are using a Winform application include this namespace
using System.Windows.Interop;
In the initialize method add this piece:
HwndSource source = HwndSource.FromHwnd(this.Handle);
source.AddHook(new HwndSourceHook(WndProc));
where WndProc is
private IntPtr WndProc(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled);
Let me know if you need a detailed implementation. I can help. Also you need to add some interop methods to access the WM_WTSSESSION_CHANGE, WTS_SESSION_UNLOCK etc.
Sunil
|
|
|
|
|
I add my files to my project, and I want open my pdf files from source of my project, how can i do this?
please help
|
|
|
|
|
You need to supply a little more info, ASPX you can just open it in a new instance of the browser and rely on the default PDF viewer (usually adobe) I think the same will work with winforms, WPF/Sliverlight is another problem.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
With Winforms you would typically use System.IO.Process.Start and rely on default application for the file type to open it.
|
|
|
|
|
you can try the following piece of code.
string filename;
filename = "report.pdf";
HttpContext.Current.Response.Clear();
Response.ClearContent();
HttpContext.Current.Response.AddHeader("Content-Disposition", "attachment;filename= " + fileName);
HttpContext.Current.Response.Charset = "";
HttpContext.Current.Response.ContentType = "application/pdf";
string filepathtemp = "C:/inetpub/wwwroot/files/" + fileName;
HttpContext.Current.Response.WriteFile(filepathtemp);
HttpContext.Current.Response.End();
Dhyanga
modified 9-Jul-12 16:38pm.
|
|
|
|
|
Hi all,
I 'm trying to loop through a List<T> to see which element in the List is empty, then add strings entered via a text box into the empty element. I tried to display the content of the List element to check what it contains. I Get the error "Index was out of range. Must be non-negative and less than the size of the collection". The following is my code:
//Function to add string dynamically in Class1
private List<string> list1 = new List<string>();
public string AddText(string myText)
{
if(list1[i]=="" & k<1)
{
k = i;
list1[i] = myText;
k++;
}
return list1[i];
}
//Calling AddText() function from Class2
private void btn8_Click(object sender, EventArgs e)
{
string myText = txtDisplay.Text;
ExpressionEval k = new ExpressionEval();
string g = k.AddText(myText);
txtDisplay.Text = g;
}
Please point out why I'm getting this error, thanks in advance.
-- modified 7-Jul-12 9:05am.
|
|
|
|