|
hi all,in my page load event,i given as
Response.Write("function check(){for(var j=0;j<al.length;j++){if(window.document.Form1.Text3.value==al[j]){alert(al[j])}}}");
btnsubmit.Attributes.Add("onclick","check();");
but when i click the button(btnsubmit)first time it doesnot show alert msg but when i click the same button again it display the alert what is the prob with my code....
Regards,
ayyp
|
|
|
|
|
please post these questions to the web development board or the asp.net board;;;
I've found a living worth working for, but I haven't found work worth living for.
<marquee>
|
|
|
|
|
i tried the following...did not encounter any such error..
Response.Write("function check(){alert('a');}")
Button1.Attributes.Add("onclick", "check()")
you may have to provide more details
|
|
|
|
|
s it work but when i call this function it wont work
function check()
{
for(var j=0;j
|
|
|
|
|
Hi,
you try this code it works.
Response.Write("function check(){alert('hi')}");
btnSubmit.Attributes.Add("onclick","check();");
|
|
|
|
|
s it work but when i call this function it wont work
function check()
{
for(var j=0;j
|
|
|
|
|
Hi make it function like this ,
function check()
{
for(var j=0;j{
if(window.document.Form1.Text3.value==al[j])
{
alert(al[j]);
return true
}
}
return false;
}
|
|
|
|
|
hi,
I'm not sure what you are trying to do..and i think there may be a problem with your syntax:
I tried something similar as follows:
function check()
{
var al=new Array();
al[0]=1;
al[1]=2;
for(var j=0;j<=3;j++)
{
//alert(window.document.Form1.Text3.value);
alert(al[j]);
if(window.document.Form1.Text3.value==al[j])
{
//alert("in");
return true;
}
else
{
alert("else");
//return false;
}
}
}
|
|
|
|
|
My application has three users 1.Administrator 2.Cash collector 3.User .If somebody has logged in as administrator he should be given access to all the drives ,desktop etc. if he is a cash collector he should be shown only one shortcut on the desktop and other shortcuts should be disabled and if he is a user he should be shown only one folder on C drive.
Is there any way to implement this functionality.
Thank you.
|
|
|
|
|
hi all,
i have a function like this in my form1.cs:
public void SendAll(string str)
{
for (int i = 0; i < Soketler.Count; ++i)
{
if (((Socket)Soketler[i]).Connected)
{
ns = new NetworkStream(((Socket)Soketler[i]));
sw = new StreamWriter(ns);
sw.WriteLine(str);
string[] dataread = new string[3];
char[] splitter = { ' ' };
dataread = str.Split(splitter);
txtOdaNo.Text = dataread[0].ToString();
txtKiraBaslangic.Text = dataread[1].ToString();
txtKiraBitis.Text = dataread[2].ToString();
cmbCOSaati.Text = "12:00";
button12_Click(sender, e);
MessageBox.Show("Kiralama Kodunuz!!!\n\n Ciktisini Almak Ister Misiniz ?"," Kira Kodu Bilgisi",MessageBoxButtons.YesNo,MessageBoxIcon.Information);
sw.Flush();
}
}
}
bold line represent a button on my form. i have a user interface and some textboxes. these boxes may be filled both manually by typing from keyboard or they can be send via tcp/ip as a string with " " (a space) in each data.
then i parse the string according to that space and assign each value to the corresponding textboxes.
the problem is this: if user fill datas manually, s/he can easily press the button12 to run it. but if datas were send via tcp/ip and textboxes filled by parsing, button12_click(sender,e); doesnt work in my function
i get these errors:
> the name 'sender' does not exist in the current context.
> the name 'e' does not exist in the current context.
how can i solve this problem and make button12_click work in my function as well ?
help please,
thanks in advance, bye.
|
|
|
|
|
The following should work:
button12_Click(this.button12, new EventArgs());
"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
|
|
|
|
|
Even better:
button12_Click(this.button12, EventArgs.Empty);
|
|
|
|
|
|
In the project I am working on ,I have one exe running 24*7 on Kiosk and its size is FullScreen. I need to start one exe (login application)as soon as I press Alt+Ctrl+A key on keyboard.How can I do it?Any help please.It's urgent.
Thank you.
|
|
|
|
|
Use event KeyDown :
private void Form1_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
{
if(e.KeyCode == Keys.A && (e.Control && e.Alt))
{
MessageBox.Show("Hello");
}
}
|
|
|
|
|
My exe is running in the background so ,it is not having focus .So this solution does not work .I need a solution in which even if my exe is running in the background ,captures the hotkey combination and does it,s prdicede task.
|
|
|
|
|
Try this (C++):
http://www.ragestorm.net/snippet?id=65
|
|
|
|
|
Can anyone help?
I have a service that’s set to interact with the current users desktop, the problem I have is I need to bring a window to front of any other window. While this works some times, in applications like Word the form does not display and is only shown in the Taskbar.
The window which is displayed by the service has the following set.
.topmost = true
.SetTopLevel = true
.Toplevel = true
And displayed using
MSCPrompt fForm = new MSCPrompt(cMessage);
fForm.ShowDialog();
Does anyone have any ideas why having set these options it still does not display on top of all other windows.
Paul
|
|
|
|
|
I tried it like this:
_instance.Show();
_instance.TopMost = true;
works!
Make shure that no other Form is set to TopMost.
All the best,
Martin
|
|
|
|
|
try .BringToFront()
Hope that works for you,
Regards,
Pramod
|
|
|
|
|
Yep, Tried this and does not work. I just can;t seem to fix this with the inbuild options of a form. may be i need to look at the Win32 API.
Cheers
|
|
|
|
|
hi,
I think i'm looking for a solution like the one you have done
May i've a look to your code?
NOthing by now;)
|
|
|
|
|
Hi All,
Am displaying icon in one of the column of the datagrid. The icon has got transperent background but while displaying on the grid it always takes white backgroud.
Can anyone help me out as how to retain the transperent background of the icon?
My Implementation Approach.
I have created a customised DataGridTextBoxColumn in which am overriding the paint method. The similar approach you will find on the net.
Any help is apprecicated.
Regards,
Kais
|
|
|
|
|
My English is very bad! I'm sorry! I am Vietname!
I want to Connect between Server and Client use Class Socket but i don't make it! Who're known? talk for me! Thankz
None Signature!
|
|
|
|
|
Use TcpClient. It is easier then Socket.
using System;
using System.Net.Sockets;
using System.Text;
using System.Threading;
namespace ConsoleApplication25
{
class Class1
{
[STAThread]
static void Main(string[] args)
{
Thread serverThread = new Thread(new ThreadStart(Server));
serverThread.Start();
Thread.Sleep(1000);
Thread clientThread = new Thread(new ThreadStart(Client));
clientThread.Start();
}
static void Server()
{
byte[] buffer = new byte[1000];
TcpListener tcpListener = new TcpListener(30000);
tcpListener.Start();
TcpClient tcpClient = tcpListener.AcceptTcpClient();
NetworkStream networkStream = tcpClient.GetStream();
networkStream.Read(buffer, 0, buffer.Length);
string stringReceived = Encoding.ASCII.GetString(buffer).Replace("\0", "");
Console.WriteLine("Server received : " + stringReceived);
}
static void Client()
{
string stringToSend = "Hello World";
byte[] buffer = Encoding.ASCII.GetBytes(stringToSend);
TcpClient tcpClient = new TcpClient();
tcpClient.Connect("localhost", 30000);
NetworkStream networkStream = tcpClient.GetStream();
Console.WriteLine("Client send : " + stringToSend);
networkStream.Write(buffer, 0, buffer.Length);
}
}
}
|
|
|
|