|
|
I create buttons dynamically using:-
Button buttonKeyboard = new Button();
buttonKeyboard.Text = "Keyboard";
buttonKeyboard.ID = "buttonKeyboard" + rowCount.ToString();
buttonPH1.Controls.Add(buttonKeyboard);
// Add a spacer in the form of an HTML element
buttonPH1.Controls.Add(new LiteralControl(" "));
How do I assign an on-click event that will call a specific method.
Clueless
|
|
|
|
|
Most likely with buttonKeyboard.Click += new Eventhandler (etc) Not sure what event handler that would be, check out the VS.NET intellisense.
|
|
|
|
|
Hi
i have a web service and a web method .
this method doesnt return any thing and perform some task .but it consumes my time ( 1 minute )to do its job.How i can only call the method ( only send a message to do its job) to overcome this problem.
|
|
|
|
|
Please dont double post.
---
b { font-weight: normal; }
|
|
|
|
|
Examples taken here :
http://pear.php.net/manual/en/package.webservices.xml-rpc.examples.php
Client : Client.php
<?<br />
<br />
ini_set("include_path", 'D:\Program Files\XML_RPC\;'. ini_get("include_path"));<br />
<br />
require_once 'RPC.php';<br />
<br />
$input = 8;<br />
$params = array(new XML_RPC_Value($input, 'int'));<br />
$msg = new XML_RPC_Message('times2', $params);<br />
<br />
$cli = new XML_RPC_Client('xmlrpc.php', '');<br />
$resp = $cli->send($msg);<br />
<br />
if (!$resp) {<br />
echo '>Communication error: ' . $cli->errstr ;<br />
exit;<br />
}<br />
<br />
if (!$resp->faultCode()) {<br />
$val = $resp->value();<br />
echo $input . ' times 2 is ' . $val->scalarval();<br />
} else {<br />
<br />
echo 'Fault Code: ' . $resp->faultCode() . "\n";<br />
echo 'Fault Reason: ' . $resp->faultString() . "\n";<br />
}<br />
<br />
<br />
?><br />
Server : xmlrpc.php
<?<br />
<br />
ini_set("include_path", 'D:\Program Files\XML_RPC\;'. ini_get("include_path"));<br />
<br />
require_once 'Server.php';<br />
<br />
function returnTimes2($params) {<br />
$param = $params->getParam(0);<br />
<br />
if (!XML_RPC_Value::isValue($param)) {<br />
return $param;<br />
}<br />
<br />
$val = new XML_RPC_Value($param->scalarval() * 2, 'int'); <br />
return new XML_RPC_Response($val);<br />
}<br />
<br />
$server = new XML_RPC_Server(<br />
array(<br />
'times2' =><br />
array(<br />
'function' => 'returnTimes2'<br />
)<br />
)<br />
);<br />
<br />
?><br />
But when i run client.php it generates :
Communication error : Operation successfull
Whithout any retrieved code from server ...
But Why ?
|
|
|
|
|
Hello there, I am tring to get the current cursor position in textarea. I'd like to know How I can get the current cursor position ( Not the mouse cursor position) in the textarea? I tried but cannot find it in the document tree. In there a way to get that?
thank you very much in advance.
Bin
|
|
|
|
|
I believe what you are refering to is called the caret.
Anyways, you could possibly use the TextRange object???
HTH
It's frustrating being a genius and living the life of a moron!!!
|
|
|
|
|
I have just finished my first ever Wed Site, but not yet hosted it.
Was thinking of using KF Server to host the site on my home PC. Is this a good idear? Or would it be best to when I buy my domain name have it hosted on there sever.
The next question I have is regarding sending out e-mails (via my 'Contact Us' page).
I was going to use AspEmail, but looking at the documentation, what do I specifify for the following field?
Mail.Host = "smtp.mycompany.com" ' Required
My ISP is BTinternet.com, so should it be smtp.BTinternet.com?
Or do I install a mail server!
Any comments please.
|
|
|
|
|
If you use your home PC as a web server you will need a dynamic domain name, so that you can automatically change the IP number that the domain name points to whenever your IP number changes.
When sending mail you specify the same smtp server as you do in your mail program. You should have the address of the server in the information you got from your ISP.
---
b { font-weight: normal; }
|
|
|
|
|
Thanks for your post.
Just two more questions if you please.
1. Are dynamic domain names more difficult to get hold off. I was going to use www.noip.com to register one.
2. If I test out my Wed site on another PC on my LAN, with just hotmail availble, what would I specify for the smto server - the same as for the Gateway PC?
Many thanks,
grahamfff
|
|
|
|
|
I have url. I want to load page and save it on disk. In principle I can load it with aid of Web Browser control.
Is there way to save complete web page with aid of script?
or
Is there another way to save complete web page programmaticly?
or may be
Is there function which load url and save its content on disk?
|
|
|
|
|
You can do that with internet explorer, it's in the save options.
There is this example to do it programatically with .net http://www.codeproject.com/vb/net/MhtBuilder.asp[^].
You should be able to something similar with COM and the web browser control.
|
|
|
|
|
I am working on a VB.NET project which has two pages in it. When I click a node in the left menu then a right page loads. Basically I am doing this on the client side using javascript, i.e I apply xslt on a xml on the client side to render HTML to the right frame.
Now I need to include a splash screeen which pops up before the right page loads.Can any body help me on this either using javascript or in vb.net.If some body can post some code it will be of great help.
Thanks in advance,
|
|
|
|
|
You need to use window.open to redirect to a URL that shows the splash screen, and contains a timer to close itself ( so it behaves like a splash screen ). window.open may be wrong, I haven't used jscript for a long time, thank goodness.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Christian Graus wrote:
I haven't used jscript for a long time, thank goodness .
Sorry ,but why is this in red block ?
|
|
|
|
|
Hello, all,
How can I make the height of a textarea box changes dynamically based on how many rows in the textarea. So when the user are typing, if the content of the textarea needs more room to display, a new row will be added to the textarea. Is it possible to do this? How can I detect that a new line is generated?
Thank you very much in advance.
Bin
|
|
|
|
|
Hi there,
To dynamically increase the height of the textarea, you simply set the rows property. Normally, the user presses Enter to begin a new line, so you can check that to decide if you need to increase the rows property of the textarea. Here is the sample code for doing that:
function AddRow(e)
{
if(e.keyCode == 13)
{
var txtArea = document.getElementById("TEXTAREA1");
txtArea.rows = txtArea.rows + 1;
}
}
<TEXTAREA id="TEXTAREA1" onkeypress="AddRow(event);" ... ></TEXTAREA> Also, you might need to check when the user pastes the text into the textarea. However, when the rows is too big, the textarea won't look friendly, and I'm curious why the auto scrollbar does not help you here.
|
|
|
|
|
Hello, thanks for your reply. I'd like to know how I can detect the soft wrap return. I mean when the user keep typing to the end of the row, there will be a soft return inserted and a new line will be added. Is there a way to detect this?
I will put the textbox control in a table and make the height of that row and text box increase to fit the user's input. Why do I do this? Because in our desktop version software, we did it that way. My boss would love to see a web application can do it in the same way.
|
|
|
|
|
I'm not sure if there is a way to detect the soft line break since I haven't tried it yet. But IMHO, since the long text is automatically wrapped, so the soft line break might be detected based on the current position of the caret. If the new curent position while the user is typing is set back to 0, then perhaps a soft line break is added. If the new position is not reset, you can compare the value with the cols property of the textarea to check if there is a soft line break. Just an idea.
|
|
|
|
|
Thank you very much for your reply.
Can you tell me how I can get the current cursor position ( Not the mouse cursor position) in the textarea? I tried but cannot find it in the document tree.
|
|
|
|
|
Hi,
actually, all you need to do is to change the default overflow handling of the textarea control to "visible", like this:
<textarea id="textArea" style="overflow:visible"></textarea>
--
Regards,
Dag
|
|
|
|
|
hello , i wana have ado with javascript but i have some problems , help me with one simple sample that connect Access file to ado and that's all !!
Have good day and time
|
|
|
|
|
|
How do I set focus to server controls created dynamically:-
Code to create controls:-
TextBox textBoxInput = new TextBox();
// Set the Textbox Text and Id Properties
textBoxInput.Text = fieldDefault;
textBoxInput.ID = "textBoxInput" + rowCount.ToString();
textBoxInput.MaxLength = fieldLength;
textBoxPH1.Controls.Add(textBoxInput);
// Add a spacer in the form of an HTML element
textBoxPH1.Controls.Add(new LiteralControl(" "));
How do I set focus to these textboxes
Clueless
|
|
|
|