|
how to get the IP address of a machine consuming a web service?
I am using C# for developing my web service.Looking for your kind attention..
Thank you..
saji
|
|
|
|
|
Hi,
I tried generating a xml file and as it has got some foreign letter in some of the names.i included the encoding type iso-8859-1 and successfully was able to view that xml file in an asp page.
Now i am trying to get that xml document in another asp page so that i can display those names in a list box.
But when i use this....
var strTxt =oXMLHTTP.ResponseText
to get the text into string and then load DOM with it....it is not able to store the encoding i used in the other asp page.
var i = xmlDOM.loadXML(strTxt)
I was told that responseText doesn't store the unicode format.Can someone tell me which other method is to be used to load unicode XML file into DOM.
Thanks.
Vani
|
|
|
|
|
Folks,
I have a web database app that uses an htm page as the user interface and calls an asp page to interact with my database. I've designed this so that the htm page calls the asp with a parameter that selects which function to run and I'm doing so using a switch statement as the first thing which gets executed when the asp page loads:
<br />
<script language=javascript runat=server><br />
var szMethod = Request.Querystring ("Method");<br />
<br />
switch (szMethod)<br />
{<br />
case "QueryUserRecs":<br />
QueryUserRecs ();<br />
break;<br />
<br />
case "AppendTicket":<br />
AppendTicket ();<br />
break;<br />
<br />
default:<br />
break;<br />
}<br />
Looks ok, right? The strange thing is, this only works if I make the szMethod variable a String object, convert it to upper case and set the switch case values upper case as well (lower case also works):
<br />
<script language=javascript runat=server><br />
var szMethod = new String (Request.Querystring ("Method"));<br />
<br />
switch (szMethod.toUpperCase ())<br />
{<br />
case "QUERYUSERRECS":<br />
QueryUserRecs ();<br />
break;<br />
<br />
case "APPENDTICKET":<br />
AppendTicket ();<br />
break;<br />
<br />
default:<br />
break;<br />
}<br />
If I don't code it this way the switch statement falls through to the default case. I've inserted Response.Write's to be sure I'm coming in with the proper Method values and it looks correct on paper, but it just doesn't work. Funny thing #2: using mixed case works if the switch statement is in the same page/module as the function which calls it:
<br />
function AddMOTD (which)<br />
{<br />
switch (which)<br />
{<br />
case "Global":<br />
break;<br />
<br />
case "Product":<br />
break;<br />
<br />
case "User":<br />
break;<br />
}<br />
}<br />
...<br />
<button name="btnAddGlobalMOTD" disabled onclick="AddMOTD('Global')">Add/Update</button></td> <br />
[Edit: the event assigned to AddMOTD() is onclick but CP has replaced it with removed (probably a safety issue). [/Edit]
Right now I have a method that works, but it seems kludgy.
Any clues as to what's going on?
'til next we type...
HAVE FUN!! -- Jesse
-- modified at 14:34 Tuesday 9th May, 2006
|
|
|
|
|
The QueryString method returns a collection, not a string. When you try to compare the collection with strings in the switch, you get no match.
Use the Value property to get the collection as a string:
var szMethod = Request.Querystring("Method").Value;
---
b { font-weight: normal; }
|
|
|
|
|
Guffa wrote: The QueryString method returns a collection, not a string
If that's the case, why do I get the proper string when I insert a Response.Write(Request.Querystring("Format"));
Also, Response.Write(Request.Querystring("Format").Value) does not print the string. In fact, I cannot find .Value as a property of Request.QueryString in any MS documentation.
Finally, I tried your suggestion and it does not work.
Thanks for trying, though.
'til next we type...
HAVE FUN!! -- Jesse
|
|
|
|
|
Jesse Evans wrote: If that's the case, why do I get the proper string when I insert a Response.Write(Request.Querystring("Format"));
Because the Write method will get the value of the collection, which is a comma separated string with the values of the collection. If the collection only contains one item, there is nothing to separate with commas so the value will be that single item.
Jesse Evans wrote: Also, Response.Write(Request.Querystring("Format").Value) does not print the string. In fact, I cannot find .Value as a property of Request.QueryString in any MS documentation.
Right. My bad. There is no Value property. My memory failed me.
The Querystring method returns an IStringList object, which has the Count and Item properties.
You can use the Item property to get the first item in the collection:
var szMethod = Request.Querystring("Method").Item(1);
As the Item property is the default property of the object, you can also write it like this:
var szMethod = Request.Querystring("Method")(1);
You can also use anything that will get the value of the collection, like:
var szMethod = new String(Request.Querystring("Method"));
---
b { font-weight: normal; }
|
|
|
|
|
Guffa,
constructs 1 & 2 work! Thanks. Strangely, construct 3 does not. Oh well, your explaination makes sense and thanks again for your help with my understanding of this.
'til next we type...
HAVE FUN!! -- Jesse
|
|
|
|
|
hi,
can anybody help me on how to create multiple checkboxes in textarea or listbox in asp
-- modified at 1:36 Wednesday 10th May, 2006
|
|
|
|
|
hi to all,
I use web chart control in my project but when i use showlegend by set it true then this show one extra imagees ( if i use 3 item show in graph then legend show 4 option one is blank image and 3 is which i used.
Problem is that " how can remove that extra image show in legend"
thanks
arvind
Arvind
|
|
|
|
|
Hi guys,
I have a div layout of my website, and I want to test it in new IE. I don't want to do much otherwise Iw will have to rebuild it later.
Is this browser available for download anywhere? I am not an MSDN subscriber/.
Regards,
ma se
|
|
|
|
|
IE 7 will be much more standards compliant than IE 6. You can expect it to render the pages pretty much like Firefox.
---
b { font-weight: normal; }
|
|
|
|
|
I am creating a deployment project. I have used custom action, and installing database. Username and password will be get from user. I also edited password character as * using Orca. But i dont know how to set msiHiddenProperties for the password. Even though the password is *, The parameter shows the password and also in log file. How to hide the parameters and user entered text in log file. and also how to use verbose log method
my email id: haikumars@gmail.com
Thanks
KumarShanmugam
|
|
|
|
|
So what I want is a footer that is *always* at the bottom of my browser window (I'm only optimizing for Internet Explorer if that makes a difference).....
But I want it to be comprised of 5 side by side DIV elements.
I've also got a container DIV elements where everything is inside of it.
I've tried two methods with varying results:
1) Make the footers have absolute positioning with bottom =0. This makes it so one DIV element is at the very bottom but the other 4 don't show up
2) Make the footers relative positioning, this makes it so that they are side by side, but occur after the last element (in other words, not at the very bottom).
3) I tried putting the footers inside/outside the wrapper DIV with no effect.
Here is the code:
#footer1, footer2, footer3, footer4, footer5{
color: #dbdfee;
height: 65px;
width: 20%;
text-align: left;
background-color: transparent;
background-image: url(img/bg_top.png);
background-repeat: repeat-x;
background-position: bottom;
margin-top: 0px;
padding-top: 0px;
padding-right: 0px;
padding-bottom: 0px;
padding-left: 0%;
position:relative;
clear: none;
float: left;
}
#footer5{
width: 19.95%;
float: left;
}
#wrapper-page{
width: 100%;
background: #b4c2d4 url(img/bg_grad.png) repeat-x center top;
margin-top: 0;
margin-right: auto;
margin-bottom: 0;
margin-left: auto;
position: relative;
min-height: 100%;
}
Ideas?
Thanks very much in advance!
This is also a question of style... if you're going to have different things going on in each DIV I thought you should divide it into different DIVs... I want to make sure my 5 DIV approach is actually correct.
|
|
|
|
|
How to package website with VB 6 become single file (exe)
|
|
|
|
|
Hi,
I am developing an application using ASP.Net 2.0; When I run the application from Visual Studio .Net, it works fine but when i run it through browser(IE) by writing "http://localhost/AB/Login.aspx".
Following Error occured:
Failed to access IIS metabase.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Web.Hosting.HostingEnvironmentException: Failed to access IIS metabase.
The process account used to run ASP.NET must have read access to the IIS metabase (e.g. IIS://servername/W3SVC). For information on modifying metabase permissions, please see http://support.microsoft.com/?kbid=267904.
I have also given the rights to the user by running aspnet_regiis –ga <windowsuseraccount>
but the problem still remains the same.
Could anyone guide me in resolving this issue.
Thanks
Regards.
|
|
|
|
|
Hi,
How to use Javascript to draw a rectangle when the user drags the mouse across the webpage?
I know the drawing methods but how do we allow the user to be able to draw a rectangle on the webpage?
e.g When the user drags the mouse across the page and releases the mouse button, a rectangle appears.
|
|
|
|
|
You could probably track the coordinates of the start and end point, then calculate the width and height of a div and place it there. The div would have a border and a transparent image as a background... Don't know if you could click on the controls behind the div dough.
Try it.
--------------------------------------------------------
My portfolio & development blog
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
I open a new window by using window.open function. But I want to execute a function in the parent window when i closing the new window . Pls Help. Urgent
|
|
|
|
|
We don't f*** care if it is urgent.
You can refrence the window that opened "you" with: window.opener.
--------------------------------------------------------
My portfolio & development blog
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
Dear all
I want to make a visitors book in my website. But, I am using only HTML , no ASP or such. So my solution is to use a JavaScript. But, I dont know how to connect to the MS Access database using JavaScript.
Could anyone help me in that.
Is there any better solution, any ready made visitors book in the net.?
Thanks a lot
|
|
|
|
|
There are probably hundreds of freely available solutions, if you care to search the Internet for them; try Google. But if you'd like to take a crack at writing your own, this[^] is a good article on general database access using JavaScript.
"...a photo album is like Life, but flat and stuck to pages." - Shog9
|
|
|
|
|
You can't connect to Access using only Javascript. Access is a file based database, and you can't access the file system of the server using Javascipt.
If you used a database server, like MS SQL or MySQL, it would be possible, but not advisable. The connectionsstring would be plainly visible in the source code, and anyone could connect directly to your database and do whatever they wanted to it.
Without using server side code there is no good way to use a database.
There are plenty of free guestbook solutions that you can use. Most of them come with some kind of advertisment, though.
---
b { font-weight: normal; }
|
|
|
|
|
Hi,
How do I draw a rectangle inside an asp.net Imagebox control?
The rectangle should be drawn when the user drags the mouse diagonally across the imagebox control.
I have tried and asked around and it seems that javascript is used to draw the
rectangle in response to the mouse dragging.
Edit/Delete Message
|
|
|
|
|
Is possible to close a Windows from an ather Windows?
|
|
|
|
|
Only if you have a reference to that window, or at least the name of the window.
---
b { font-weight: normal; }
|
|
|
|