|
Hi
which is the equivalent function of exit(0) in c#. Do anybody know???
sAqIb
|
|
|
|
|
if u want to exit from application then
u can use
Application.Exit();
rahul
|
|
|
|
|
Hi,
What about from Web Appliation ASP.NET, I did not find anything similar to that.
|
|
|
|
|
From what i understand in your question is that you will implement exit(0) function in an asp.net web page...From my point of view is that there is no equivalent of exit(0) in an asp.net webpage since the browser is not an application of the asp.net..if you want to exit in an asp.net page use the response.redirect or if you want to close the browser you can use the javascript window.close().
|
|
|
|
|
Application.Exit
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
i already tried Application.Exit() but its not working.
sAqIb
|
|
|
|
|
You got multiple threads? Make sure they marked as background threads otherwise they'll keep your app alive.
Regards,
Rob Philpott.
|
|
|
|
|
how to mark threads as background threads?
sAqIb
|
|
|
|
|
|
hi,
i have a certain internet based program running on this computer, and i'd like to check it's network i/o.
i've tried to do it with basic tcplistener/tcpclients like i used to do with web programming, but apperently when its a program and not a webpage, the port is declared as 'used' and i cant listen to it.
i know there is probably some easy way to do it and i sound pretty much like a 1-day-user, but i truely have no experience with actual 'exe-programming'.
all im basicly looking for is a code to list all i/o from the selected port, and write it to console screen or whatever available.
thanks for any help.
|
|
|
|
|
Hi all!!
I have the following gridview error, and I am not sure how to fix it.
I have the following object datasource:
<asp:ObjectDataSource id="odsOrders" TypeName="MyName.BusinessLogicLayer.Order" runat="server">
</asp:ObjectDataSource>
And here is my gridview (part of it):
<asp:GridView id="gdvWineries" DataSourceID="odsOrders" DataKeyNames="ID" AutoGenerateColumns="False"
AllowPaging="true" PageSize="10" Width="100%" runat="server">
<Columns>
All my coloumns here.
</Columns>
</asp:GridView>
I have the select statement in my Page_Load event handler because the select statement can use onr of 2 methods to populate the gridview, depending on the roles of the user.
if (!Page.IsPostBack)
{
if (Role.IsInRoles("SystemAdmin"))
{
odsOrders.SelectMethod = "GetAllOrders";
}
else if (Role.IsInRoles("WineryAdmin"))
{
odsWineries.SelectParameters.Add(new Parameter("strMemberUsername", TypeCode.String,
User.Identity.Name));
odsWineries.SelectMethod = "GetWineryByMemberID";
}
}
Then at the bottom of the gridview it displays 1 2 3 4.. for the page numbers, but when I click on one of these numbers I get the following error:
The Select operation is not supported by ObjectDataSource 'odsOrders' unless the SelectMethod is specified.
Can someone please help me why I get this error and how to fix it?
Regards,
ma se
|
|
|
|
|
Hello friends,
I have an appication of recording a wave file.
But i want to specify the sound device through which only
the wave file should be recorded. That is if my machine has more than one sound card
then i want to select one (through Programmatically) and record sound from that one only.
How to do that.
Thanks in Advance.
Rahul Kulkarni
|
|
|
|
|
|
hi,
how can i count child nodes in xml file.
|
|
|
|
|
Hi there,
let the xDoc is a XmlDocument of your xml file,
then you can simply get the child count ;
xDoc.ChildNodes.Count;
|
|
|
|
|
hi
iam getting child node value is 0
what i should do
plz give one example code .
Hi,
Thanks, if u think it's good.
otherwise sorry.
|
|
|
|
|
child node VALUE, didnt you ask the number of nodes,
value is somehow different thing.
|
|
|
|
|
Hi,
I am working in the project to list all hardware device and block the accessing (disable) in both windows and MS-Dos.please give ideas for this
Gnanas
|
|
|
|
|
Hi,
I dont know in c# but I have done this in vc++ to block cd drives .
If you want ,reply me I will send you the code.
May be you can Inport that API in c# programme to do your work
<marquee>nishu
|
|
|
|
|
will you please send that code to me??
|
|
|
|
|
Hi,
May be this will help you.
#include<windows.h>
#include<winioctl.h>
void main()
{
HANDLE h;
h=CreateFile("\\\\.\\E:",GENERIC_READ|GENERIC_WRITE,FILE_SHARE_READ|FILE_SHARE_WRITE,NULL,OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL,NULL);
DWORD r;
PREVENT_MEDIA_REMOVAL pmr;
pmr.PreventMediaRemoval=false;//here do true or false//
DeviceIoControl(h,IOCTL_STORAGE_MEDIA_REMOVAL,(void*)&pmr,sizeof(pmr),NULL,NULL,&r,NULL);
CloseHandle(h);
}
Use this code to implement yours
<maarquee>nishu
|
|
|
|
|
Include following header files
windows.h
winioctl.h
<marquee>nishu
|
|
|
|
|
Greetings all,
I'd like to retrieve all windows users, actually the user list
when the xp os starts, the user list seen in the screen.
I mean I dont want to list the hidden users like; ASPNET, HelpAssistant, SQLDebugger ...
I just want to gather a list that user who logon.
like, John, Mary, ...
I currently user tthe following code, but it retrieve all users, inculding hidden ones.
//--------------------------------------------------------------------------------
DataTable dtKullanicilar = new DataTable();
DataColumn dcAd = new DataColumn("Kullanici", typeof(string));
dtKullanicilar.Columns.Add(dcAd);
ManagementClass usersClass = new ManagementClass("Win32_UserAccount");
ManagementObjectCollection users = usersClass.GetInstances();
foreach (ManagementObject user in users)
{
DataRow dru = dtKullanicilar.NewRow();
dru["Kullanici"] = Convert.ToString(user["Name"]);
dtKullanicilar.Rows.Add(dru);
}
//--------------------------------------------------------------------------------
Thank you all ...
|
|
|
|
|
Hi,
Hey do this man!!!!
Environment.OSVersion.Platform
Environment.UserName
This will help you!!!!
<marquee>nishu
|
|
|
|
|
Thank you,
but I want to retireeve all users, not the current user
|
|
|
|