|
nmhai83 wrote: I created icon for file and run my program when double click the file. Thank you very much.
That's why you voted one for my reply?
Giorgi Dalakishvili
#region signature
my articles
#endregion
|
|
|
|
|
for validation:
I want to call a function which is in .js file,
function called in inline code by
<asp:textbox id="TextBox2" onkeypress="function name" runat="server" xmlns:asp="#unknown"></asp:textbox>
is it correct way to call ????
or any one tell me the write way to call function from javascript file
i already done following code runnable for keypress event,
<asp:TextBox ID="TextBox1" onkeypress ="
if (!((event.keyCode > 47 && event.keyCode < 58)||event.keyCode==45||event.keyCode==46||event.keyCode==110||
event.KeyCode==190||event.keyCode==8||event.keyCode==9))
{
alert('Please Enter Numbers only...');
event.returnValue = false;
}
else
{
event.returnValue=true;
}
" runat="server"></asp:TextBox>
Please tell me the way to call function in aspx inline code
or any fault in given code
|
|
|
|
|
please read this[^]
before you make a question
dhaim
programming is a hobby that make some money as side effect
|
|
|
|
|
Hi,
I have a windows application running in a LAN.
I have some reports developed by Crystal Report and a printer shared in the network.
but when I want to print in a system an error apperes about RPC and the print fails. but on the computer that is directed connetc to Printer that's OK.
Why?
Best wishes
|
|
|
|
|
Because you have some kind of problem with the installed printer driver for that printer. Sorry, it has nothing to do with your code.
|
|
|
|
|
String strSelectStatement = "SELECT EMP_NAME FROM EMPS WHERE EMP_TYPE ="MyCheckBox.Checked == true ? "1" : "0";
Error 4
Operator '==' cannot be applied to operands of type 'string' and 'bool'
And for your shock, it will work if you put true in qoutations to be "true"
All generalizations are wrong, including this one!
(\ /)
(O.o)
(><)
|
|
|
|
|
Sorry, it's just my IDE was feeling sick! It's working fine now!
All generalizations are wrong, including this one!
(\ /)
(O.o)
(><)
|
|
|
|
|
If you are going to continue to answer your own questions I'm going to have to get your message count adjusted or something.
Glad you could be of service to yourself - oops that could be a vision I could do without!
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Mycroft Holmes wrote: If you are going to continue to answer your own questions I'm going to have to get your message count adjusted or something
I just thought it's rude to delete a question when I find the answer so instead, I post the answer! Besides, why would I care to have my message count go higher??
Mycroft Holmes wrote: Glad you could be of service to yourself - oops that could be a vision I could do without!
Ha ha ha! Good one though
All generalizations are wrong, including this one!
(\ /)
(O.o)
(><)
|
|
|
|
|
Your right, it is much better to post your solution rather than delete the post.
My current favourite word is: Nipple!
-SK Genius
Game Programming articles start - here[ ^]-
|
|
|
|
|
It wasn't your IDE, you're just missing a "+ " sign after the select statement, that's why intellisense didn't know how to parse your line. You can also omit the == true comparison if you like.
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
That's poor programming practice. You should contain the comparison in parens, like so:
String strSelectStatement = "SELECT EMP_NAME FROM EMPS WHERE EMP_TYPE =" (MyCheckBox.Checked == true) ? "1" : "0";
Or, you could use string.Format:
string strSelectStatement = string.Format("SELECT EMP_NAME FROM EMPS WHERE EMP_TYPE ={0}", (MyCheckBox.Checked == true) ? "1" : "0");
Or, you could use the StringBuilder class:
StringBuilder sql = new StringBuilder("SELECT EMP_NAME FROM EMPS WHERE EMP_TYPE =");
sql.Append((MyCheckBox.Checked == true) ? "1" : "0");
No matter how you do it, you should enclose the comparison with parenthesis...
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
hi
i was designed a new TableAdapter in Viusal Studio 2005 DataSet Designer(add new table and set it's CRUD command with Stored Procedures), the first column of table is pk and identity, my problem is that the insert method parameters is :
t1TableAdapter.Insert(ref int? id,int? number,string name)
first question : what is '?' ?
second question : when i insert my record by following code :
int id = -1;
int number = int.Parse(this.textBox2.Text);
string name = this.textBox3.Text;
this.adapter.Insert(ref id, number, name);
the following error message has shown me :
The best overloaded method match for 'DataAccessDesigner.DsMyDbTableAdapters.t1TableAdapter.Insert(ref int?, int?, string)' has some invalid arguments.
Argument '1': cannot convert from 'ref int' to 'ref int?'
how to solve it ?
---------------------------------------------------------------------------------
another problem is that when i declare id as int? instead of int, like this :
int? id = -1;
int number = int.Parse(this.textBox2.Text);
string name = this.textBox3.Text;
this.adapter.Insert(ref id, number, name);
this.button1_Click(null, null);
it compile and when i insert a new record, the stackOverFlow exception has occuerd, why ?
thanks
modified on Saturday, September 13, 2008 5:29 AM
|
|
|
|
|
Hi,
Any idea how can you get the icon of an exe or dll file?? say from %windir%system32\SHELL32.dll
I dont know how to do it but I'm sure C# can do it
All generalizations are wrong, including this one!
(\ /)
(O.o)
(><)
modified on Saturday, September 13, 2008 4:09 AM
|
|
|
|
|
|
Hi all,
We have requirement of generating Graphs using xml with crystal reports.
Please kindly suggest me how to do that.
Thanks inadvance
cheers,
sekhar
|
|
|
|
|
use dataset to read xml, and use that as datasource for your crystal report
dhaim
programming is a hobby that make some money as side effect
|
|
|
|
|
hi
i have c++ code which i want to change it to the c# code,i must using pointers,
can i change below code to the c# ?
int *p1,*p2;
int i=0;
p1=&i;
*p1=100;
p2=p1;
|
|
|
|
|
You can use an unsafe block.
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Although there are softwares for this purpose, my aim is to create a windows application which will simply show cpu temperature
for the time intervals I give in , and will display no other options (such as voltage,etc.. which are going to consume computer resources (cpu,ram)). I want it to be simple : just a label of cpu temperature (as I'm having a problem with my cpu temp.)
I've searched the net and find something about the Management Class, but couldn't retrive the temperature..
I guess it should be two or three lines of code to obtain it and I'd be glad to get your help.. thanx
|
|
|
|
|
Here's a silly example of one way to use WMI to display processor info.
This uses the WMI Win32_Processor class, but the
Win32_TemperatureProbe Class[^] class could be used.
Seems most hardware doesn't support it though.
Doesn't hurt to try it.
int ProcessorIndex = 0;
ManagementObjectSearcher searcher = new ManagementObjectSearcher("SELECT * FROM Win32_Processor");
ManagementObjectCollection.ManagementObjectEnumerator enumerator = searcher.Get().GetEnumerator();
while (enumerator.MoveNext())
{
Console.WriteLine("ProcessorIndex: {0}", ProcessorIndex++);
if (null != enumerator.Current["Name"])
Console.WriteLine("Name: {0}", enumerator.Current["Name"].ToString());
if (null != enumerator.Current["Description"])
Console.WriteLine("Description: {0}", enumerator.Current["Description"].ToString());
if (null != enumerator.Current["NumberOfCores"])
Console.WriteLine("NumberOfCores: {0}", enumerator.Current["NumberOfCores"].ToString());
if (null != enumerator.Current["NumberOfLogicalProcessors"])
Console.WriteLine("NumberOfLogicalProcessors: {0}", enumerator.Current["NumberOfLogicalProcessors"].ToString());
if (null != enumerator.Current["L2CacheSize"])
Console.WriteLine("L2CacheSize: {0} KB", enumerator.Current["L2CacheSize"].ToString());
if (null != enumerator.Current["L2CacheSpeed"])
Console.WriteLine("L2CacheSpeed: {0} MHz", enumerator.Current["L2CacheSpeed"].ToString());
if (null != enumerator.Current["L3CacheSize"])
Console.WriteLine("L3CacheSize: {0} KB", enumerator.Current["L3CacheSize"].ToString());
if (null != enumerator.Current["L3CacheSpeed"])
Console.WriteLine("L3CacheSpeed: {0} MHz", enumerator.Current["L3CacheSpeed"].ToString());
if (null != enumerator.Current["LoadPercentage"])
Console.WriteLine("LoadPercentage: {0}", enumerator.Current["LoadPercentage"].ToString());
Console.WriteLine("------------------------------------------");
}
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hi there.
I want to convert each node and child node in treeView.Nodes to contextMenuStrip's items !
Do you have any suggestions ?
Thank you.
|
|
|
|
|
Hello. I've got a little problem I've been having a hard time solving.
I'm trying to use the web browser control on a windows form to get the html of a frame that the given page contains. I can't just simply use the url of that inner frame, because with each login to this site it has an appended session ID on the url and other such a=b&c=d&e=f nonsense that changes from session to session. Digging through google I found mention of webBrowser1.Document.Window.Frames[0 /*or any other index for that matter, but in my case there is only 1 element*/ ].Document.Body but this threw a System.UnauthorizedAccessException when I tried it.
Ultimately, what I'm going for is a rather simplistic project but it's giving me fits on this point. I'd like to be able to login on this form on ogame.org and have it refresh every five minutes, searching the contents of "mainframe" for the word "hostile" - and if this is found, sound an alarm (system speaker et all), as this would mean one of my planets has an incoming attack, and I know how to do all of this except getting the damn mainframe's source. I know it shouldn't be too hard to do - in my opera browser I can just right click, go to the frame menu, and open it up just fine, and that's the source I want! but I can't get this out of my web browser control. all I can get is--
[code]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict //EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<meta name="author" content="Gameforge Productions GmbH" />
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
<meta name="keywords" content="META_KEYWORDS" />
<meta name="description" content="META_DESCRIPTION" />
<meta name="robots" content="index, follow" />
<meta name="language" content="en" />
<meta name="distribution" content="global" />
<meta name="audience" content="all" />
<meta name="author-mail" content="info@ogame.de" />
<meta name="publisher" content="Gameforge Productions GmbH" />
<meta name="copyright" content="(c) 2007 by Gameforge Productions GmbH" />
<meta http-equiv="expires" content="0" />
<meta http-equiv="pragma" content="no-cache" />
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
<title>OGame.org</title>
</head>
<frameset rows="*,0,0" frameborder="no" border="0" framespacing="0">
<frame name="mainframe" src="home.php" frameborder="0" scrolling="auto" noresize>
</frameset>
</html>
<script>
frame = document.getElementsByName['mainframe'][0];
if ( typeof( window.innerWidth ) == 'number' ){
if (window.innerWidth <= 800){
frame.scrollbars.visible=true;
}
}else {
if (document.body.clientWidth <= 800){
frame.scrollbars.visible=true;
}
}
</script>
[/code]
--from the top level page.
If anyone knows a thing or two about this windows control and is able to help me I'd be really grateful. I've been working on this all day and can't get it to work because of this one, single problem.
Thanks!
-Gatsby
|
|
|
|
|
Hi
I am trying to pass data back and forth windows forms but I am having trouble. What I am trying to do is this:
I have a mainForm that has 2 textboxes called plainText and ChiperText. This main form also has a menu bar of different algo to choose from(for instance shift Chiper).
When shift chiper is clicke id launched a new form(shiftchiper.cs). It has some options and it also have a toolbar with Encrypt and decrypt.
When encrypt is hit I want to take the data from mainForm PlainText textbox and encrypt it. Once encrypted send it back to the mainForms chiperText box.
If they hit decrypt it's the same thing just reversed.
By using this tutorial( I used the property way)
http://www.codeproject.com/KB/cs/pass_data_between_forms.aspx
I been able to send the PlainText data to the shiftChiper form and encrypt it. What I can't do is send the new encrypted data back to the ChiperText textbox in the mainForm.
So anyone know how to do this?
I simple example would be nice. It can be just 2 textboxes on one form and a button. when the button is clicked a form2 is made and it sends over one of the textboxes. One form2 it can have a button when clicked it sends the data that was sent back to form1.
I am doing it in C# by the way.
|
|
|
|
|
I think I know what you're talking about. let me see if I can help.
Anything in public access space on the popup can be accessed by the main form from wherever the instance of the popup is.
For example. on my main form named form1 I have a button that opens a popup named form2. in the button click event on form1's button I'd have something to the effect of
PopupFormTypenameGoesHere form2 = new PopupFormTypenameGoesHere( params to send et all)
form2.ShowDialogue();
Text = form2.someInfo;
and in form2's close event I'd have
someInfo = "hello world"; // or whatever
This would cause form1's title (ie it's Text property) to be set to "hello world" after the popup had closed (or whatever someInfo was set to in that form)
I hope that helps.
One thing you should be careful with is the usage of Show() and ShowDialogue() - they are NOT interchangeable.
-Gatsby
|
|
|
|