|
To use the http authentication one has to override the GetWebRequest function and append http authorization header as follows:
<br />
using System;<br />
using System.Collections.Generic;<br />
using System.Text;<br />
using System.Web.Services.Protocols;<br />
using System.Net;<br />
<br />
namespace WindowsApplication1.WebServiceAPI<br />
{<br />
public class WebServiceAPIAuth : WebServiceAPI<br />
{<br />
public string UserName;<br />
public string Password;<br />
<br />
private string S2Base(string s)<br />
{<br />
byte [] ba;<br />
ba=Encoding.ASCII.GetBytes(s);<br />
return Convert.ToBase64String(ba);<br />
}<br />
<br />
protected override System.Net.WebRequest GetWebRequest(Uri uri)<br />
{<br />
CredentialCache cc = new CredentialCache();<br />
WebRequest wr = base.GetWebRequest(uri);<br />
wr.Headers.Add(HttpRequestHeader.Authorization, "Basic "+S2Base(UserName+':'+Password));<br />
return wr;<br />
}<br />
}<br />
}<br />
|
|
|
|
|
Hi all,
can anyone tell me how I can simulate a clicking on a button (that is instead the user clicking with the mouse, I want to click for him).
more specifically, on the send mail in outlook's new mail window.
BUT it needs to be a "behind the stage" action, so I wont compete with the user on the mouse...(he will win and I'll miss the clicking...).
Thanks
P.S.
I assure you its not for a malware....
lior
|
|
|
|
|
Is this web development? If so it can easily be done with java script.
Brad
Australian
- Captain See Sharp on "Religion"
any half intelligent person can come to the conclusion that pink unicorns do not exist.
|
|
|
|
|
not really web development,its a part of a software I'm working on. but I can to embed the script in a HTML body or invoke it.
would like to here your solution anyway...
Thanks.
|
|
|
|
|
If you give the form a name attribute (ie. name="thisForm") then you can call the forms attributes like this:
<br />
thisForm.button1.click();<br />
And that code will click a button with the name name="button1".
Brad
Australian
- Christian Graus on "Best books for VBscript"
A big thick one, so you can whack yourself on the head with it.
|
|
|
|
|
Thans man, but do you know how can I specifically click a button in an applicatio that is not mine? like the outlook's new mail window? how do I know the name of the button (like if I want to click the send button?
thanks again...
|
|
|
|
|
Is the outlook mail window web based?
Brad
Australian
- Christian Graus on "Best books for VBscript"
A big thick one, so you can whack yourself on the head with it.
|
|
|
|
|
its the regular outlook from office2003....
|
|
|
|
|
The why are you posting this in the web development forum?
Brad
Australian
- Christian Graus on "Best books for VBscript"
A big thick one, so you can whack yourself on the head with it.
|
|
|
|
|
couse I want to implement it in a javascript embedded in a HTML Form.
it seemed like the right place.....
|
|
|
|
|
Where will this HTML form be located?
Brad
Australian
- Christian Graus on "Best books for VBscript"
A big thick one, so you can whack yourself on the head with it.
|
|
|
|
|
How can I disable selection of text? I saw that in IE this could be done with setCapture. What about Netscape? Is there some style property that can be used with this purpose?
-- modified at 7:03 Monday 12th February, 2007
|
|
|
|
|
You may find that doing this just irritates people. But the BEST way to do it is put it in an image.
Brad
Australian
- Christian Graus on "Best books for VBscript"
A big thick one, so you can whack yourself on the head with it.
|
|
|
|
|
Thanks for your trying.
But if you want to help, then help people sincerely.
All the best for your career.
|
|
|
|
|
Mate I gave you a dead straight answer there. No matter what you try with Javascript people can get around it.
Brad
Australian
- Christian Graus on "Best books for VBscript"
A big thick one, so you can whack yourself on the head with it.
|
|
|
|
|
Hello, there,
In my current project, I am dealing with table with many many columns. I need to make a table with first several columns fixed. It is like the table in Excel with locked columns. Only the columns after the fixed columns can be scrolled horizontally. It seems very difficult to implement. I could not figure it out.
I am thinking to put two tables together and put them in a div. But it seems difficult to edit everything in a whole row. Because they are actually 2 rows from two tables.
Is there any link or sample code for this kind of table?
Thank you so much in advance.
|
|
|
|
|
How are you currently implementing this?
Brad
Australian
- Christian Graus on "Best books for VBscript"
A big thick one, so you can whack yourself on the head with it.
|
|
|
|
|
Thank you for your reply.
I am thinking put the fixed columns in a seperate datagrid and put two datagrids (or tables) together. But it seems it is quite complex to do it, especially the editing part. Is there any easier way to do this?
Thank you very much.
|
|
|
|
|
I think the only way to do this is with 2 divs... or some fancy javascript scrolling.
Brad
Australian
- Christian Graus on "Best books for VBscript"
A big thick one, so you can whack yourself on the head with it.
|
|
|
|
|
I agree with you. Thank you so much.
|
|
|
|
|
pls Sir tell me procedure of web services uses
R.K.Bansal
|
|
|
|
|
|
I earlier asked for a method for doing setTimeout in a javascript class. Searching the Internet, I got an excellent class; but it was hard to find. So, I decided to post it here for the benefit of others who may find themselves in the same predicament as I was.
http://www.codingforums.com/showthread.php?t=10531[^]
Thomas
modified 29-Aug-18 21:01pm.
|
|
|
|
|
That's pretty cool.
Brad
Australian
- Christian Graus on "Best books for VBscript"
A big thick one, so you can whack yourself on the head with it.
|
|
|
|
|
hey thomas ,,
thanks buddy... nothing new in that.. but the way it has been done it very good..
keep helping others
Ravi Kant Srivastava
(System Analyst)
HandsOn Technology & Engineering
Gurgaon
(India)
e-mail:ravikant@hte.co.in
|
|
|
|