|
Dear All,
Let me know about the basics of windows Remoting & COM programming.Regards.
Raihan Masud
|
|
|
|
|
You might want to take a look here.
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
i have a webpage with asp button. in server side, i wrote some code for its button click event to delete the page data.
but in client side i want user to confirm the deletion action. so i write this javascript code:
{if(confirm("do want to delete data...."))}
i don't know what to do to prevent page postback for false condition.
what should i do...
Thanks Rastgar
|
|
|
|
|
{if(!confirm("do want to delete data....")) return;
else do();}
|
|
|
|
|
i now 'if' parts and what 'return' does.
the thing that i don't know is how to stop my page from postback. but now i found it. to know that refer to my reply to guffa
Thanks Rastgar
|
|
|
|
|
Return a boolean in the click event of the button:
onclick="return confirm('Delete?');"
If the event returns false, the button click is stopped.
---
b { font-weight: normal; }
|
|
|
|
|
Thanks alot.
but your sample code doesn't work or atleast i couldn't understand you and apply your method.
but i found another method in other forum. here it is...
{
if(confirm('do you want to delete?') return true;
if(document.all && window.event) event.returnValue = false;
return false;
}
it works so much better and do what exactly i wanted.
Thanks Rastgar
|
|
|
|
|
The code that I wrote does work, but the backwards way that this forum uses for "security" changed it.
Remove the * in the code:
o*nclick="return confirm('Delete?');"
---
b { font-weight: normal; }
|
|
|
|
|
Hi,
I want to make a for statement that displays the divide by sums like this:
1 / 1 =
2 / 1 =
3 / 1 =
4......
2 / 2 =
4 / 2 =
6 / 2 =
8......
Up until 5. How can i make that in a for statement?
Thanks in advance!
|
|
|
|
|
If you want help with your code, don't you think that you should at least make an attempt at writing any first?
---
b { font-weight: normal; }
|
|
|
|
|
Hi Guffa,
I did! Just didn't worked out. This is what i had
for (int i = 1; i < 11; i++)
{
for(int j = 1; j < 11; j++)
{
answer = i / j;
}
}
|
|
|
|
|
This is okay, why doesn't it work?
Replace answer = i / j; with Console.WriteLine(j/i); to see the output.
Note that I replaced i/j through j/i, so that the divisions have a more readable order.
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Hi Greeeg,
I guess it works but not the way i liked it to be.
It suppose to print this:
1 / 1 =
2 / 1 =
3 / 1 =
4 / 1 =
etc.
2 / 2 =
4 / 2 =
6 / 2 =
etc.
3 / 3 =
6 / 3 =
9 / 3 =
etc.
4 / 4 =
8 / 4 =
12 / 4 =
etc.
5 / 5 =
10 / 5 =
15 / 5 =
20 / 5 =
etc.
But instead of printing it like this, it prints this:
1 / 1 =
2 / 1 =
3 / 1 =
etc.
1 / 2 =
2 / 2 =
3 / 2 =
etc
1 / 3 =
2 / 3 =
3 / 3 =
etc
Like this up until "x / 10 =".
Do i have to make anther for statement in those 2 for statements?
|
|
|
|
|
Somehow like this:
for (int i = 1; i < 5; i++)
{
for (int j = 1; j < 5; j++)
{
for (int k = j; k < j*5; k+=j)
{
Console.WriteLine(k + "/" + i);
}
}
}
It's bugged, but I don't know where the error is right now.
Just play around a bit with it.
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Hi,
Thank you, i'll try a few things with it!
|
|
|
|
|
for(int i = 1 ; i < 11 ; i++ )
for(int j = 1 ; j < 11 ; j++ )
Console.WriteLine(j * i + "/" + i);
I think this is simpler.
|
|
|
|
|
Hi Adis,
That worked, thank you very much!
|
|
|
|
|
lets say I have 5 buttons and 1 text box
I want to get the text from all the button
so if I click one of the button the text of the same button
will be written in the textbox but!
I can use 5 event's
I only need to use on event.
please someone help me
|
|
|
|
|
Register the same event handler to all buttons, cast the sender parameter of the event handler from object to Button and finally access the button's text.
"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
|
|
|
|
|
Hi...
What is the command for 'EchoOff' & 'EchoOn' in C# for SerialPort communication in C#.
Regards,
Vinay
|
|
|
|
|
Sounds like what you are really talking about it the echo from a modem, the serial port itself has no echo. If I am right it all depend on the modem you are using. Most "Hayes" modems use &E0 and &E1.
|
|
|
|
|
Hi!
I found this text when I serched MSDN for "unmanaged exceptions". Does anyone knows what it means?
""
Managed Code
In managed code, you cannot continue execution in the same thread after an unhandled exception. The thread terminates. If it is the program thread, the program itself terminates.
""
I have an application that simply terminates, NO exceptions, NO fault codes, NO dialog box saying: "an unhandled excep..."
|
|
|
|
|
Hi!
When does this occurr? Does your application use interop? In that case chances are that something is wrong there (struct or function declarations slightly wrong).
But without any code it's impossible to say for sure.
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
Judge.dll defines following two struct types and exports the method
i4IcsJudgeStartGame. In csharp code there is a wrapper for this method.
Building succeeds, but running get an exception:
{System.Runtime.InteropServices.MarshalDirectiveException}
{"Can not marshal parameter #4: Invalid managed/unmanaged type combination
(this value type must be paired with Struct)." }
:Please help me, what's the problem in these code.
============================ in Judge.dll ========================
struct IcsGameRule
{
int fgHasTimeLmt;
unsigned short int u2RangZi;
unsigned short int u2TieMu;
};
struct IcsGameTime
{
unsigned char ucHour;
unsigned char ucMiniute;
unsigned char ucDumiaoLen;
unsigned char ucDumiaoCnt;
};
DllExport int i4IcsJudgeStartGame(unsigned int Judge,
int Type,
struct IcsGameRule Rule,
struct IcsGameTime Time);
===================== in csharp wrapper ==================================
[StructLayout(LayoutKind.Sequential)]
public struct GameRule
{
public int HasTimeLmt;
public ushort RangZi;
public ushort TieMu;
}
[StructLayout(LayoutKind.Sequential)]
public struct GameTime
{
public byte Hour;
public byte Miniute;
public byte DumiaoLen;
public byte DumiaoCnt;
}
[DllImport("judge.dll")]
private static extern int i4IcsJudgeStartGame(
[MarshalAs(UnmanagedType.U4)]uint judge,
[MarshalAs(UnmanagedType.I4)]GameType type, //GameType is enum
[MarshalAs(UnmanagedType.LPStruct)]GameRule rule,
[MarshalAs(UnmanagedType.LPStruct)]GameTime time);
|
|
|
|
|
Hi!
Try replacing [MarshalAs(UnmanagedType.LPStruct)] with ref .
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|