|
Have you tried Microsoft's Internet Transfer Control? You can provide it with a URL (from your user) and it will request the page and return the source HTML to your ASP code as a string. For example:
Set Inet1 = Server.CreateObject ("InetCtls.Inet")
Inet1.Protocol = 4 'HTTP
Inet1.AccessType = 0 'Direct connection to internet
Inet1.RequestTimeout = 60 'in seconds
Inet1.URL = "http://www.codeproject.com"
result = Inet1.OpenURL 'get the sourse for the url.
as the end of this, the string "result" should hold the source for www.codeproject.com, which your ASP can then parse and present to the end user.
Look up "Internet Transfer control" in the MSDN library for more documentation.
|
|
|
|
|
Hi everyone.
I am making a bar chart using System.Drawing. I've figured out how to
do it, but with one problem. The rectangles that are being drawn for
the bars in the chart are always upside down. I don't know why. When I
set the y property of the rectangle, I figured that would be the base
of the rectangle and the height of my rectangle would make it higher
from there. But instead y acts as the top of my rectangle and the rest
is underneath it. So the effect is that my bar charts are upside
down... sagging down as apposed to going up.
Here is the code I am using to create my bar chart rectangle:
//Draw rectangle to make a bar in the chart
objGraphics.DrawRectangle(new Pen(Color.Blue, 2), xInt, yInt,
barWidth, barHeight);
//Create gradient brush
LinearGradientBrush lBrush = new LinearGradientBrush(rect,
Color.Yellow, Color.Red, LinearGradientMode.Vertical);
//Fill rectangle with gradient
objGraphics.FillRectangle(lBrush, rect);
I noticed a few other articles where people said they had problems
with System.Drawing outputting upside down, but there were no answers
that applied to what I am doing, so any help with this is very greatly
appreciated.
Thanks.
|
|
|
|
|
It sounds like the system is treating the upper left corner as coordinate 0,0. Increasing the x dimension moves to the right, increasing y moves down the page. I'm not familiar with System.Drawing, but check to see if there's a property that redefines the coordinate system...
|
|
|
|
|
I'm using Access 2000 on my web site and the whole site is on Russian. The problem is when I'm displaying records from database (russian text) I see only "??????" instead of normal text. On my home computer (Win2000 with Russian installed) i have no problem.
Any ideas why is it so and how to solve it? Or the only way si to ask the provider to install Russian support on one of their servers?
Thanx in advance
Philip Patrick
"Two beer or not two beer?" (Shakesbeer)
Web-site: www.saintopatrick.com
|
|
|
|
|
After sign out from website if i click back button in IE . it is going back , it should not go to previoues page .
can you help me in this regard i am using ASP software .
can you help me plz plz plz
thank you
Siva
|
|
|
|
|
siva_prasad wrote:
After sign out from website if i click back button in IE . it is going back , it should not go to previoues page .
can you help me in this regard i am using ASP software .
Ok, couple of things.
First, put Response.Expires = 0 at the top of any page you want to not be cached.
Second, put some kind of login script at the top of each page you want password protected.
A common example is
Response.Expires = 0
If Session("UID") = "" Then Response.Redirect ("login.asp")
Naturally the Login.asp page will need to put the user id into that Session variable.
This way ASP checks each time a person hits a page to see if they are logged in or not.
regards,
Paul Watson
Bluegrass
Cape Town, South Africa
"The greatest thing you will ever learn is to love, and be loved in return" - Moulin Rouge
Sonork ID: 100.9903 Stormfront
|
|
|
|
|
Can anybody tell is there any limitation to the size of xml file?
thanks
Mazy
Don't Marry a Person You Can Live With...
Marry Someone You Can Not Live Without
|
|
|
|
|
XML itself doesn't set any limits, but your OS or some other piece of software manipulating the file might have a size limit.
|
|
|
|
|
thanks markkuk
Mazy
Don't Marry a Person You Can Live With...
Marry Someone You Can Not Live Without
|
|
|
|
|
I'm working on ASP.NET,in Global.aspx.cx in the Session_start
I put this:
// configure the session...
Session["canedit"] = false;
and in the page I want to edit in Page_Load I put this lines in the begining
of it:
if((bool)Session["canedit"]==false)
Response.Redirect("CannotEdit.aspx");
but when I run project and click the link for edit,this error occur for my if line
Object reference not set to an instance of an object.
any suggestion?
Mazy
Don't Marry a Person You Can Live With...
Marry Someone You Can Not Live Without
|
|
|
|
|
Mazdak wrote:
Object reference not set to an instance of an object.
I got this error many times and I only found out that I had declared or tried to use an object which has a NULL value. So check the other lines of code in your Page_Load(May be its not the Session object that's causing this problem). See if they have any object which at any condition may fail to have an instance.
If still couldnt find it, If I were you, I would comment out lines of codes and find out where it is happening (if you dont have the debugger).
If you have debugger, find out the value of Session["canedit"] in the Page_Load.
omkamal
|
|
|
|
|
Thanks,that was exactly you said
Mazy
Don't Marry a Person You Can Live With...
Marry Someone You Can Not Live Without
|
|
|
|
|
I'm trying to create a forums site, and I would like to add a date to all posts. At the moment I have the following code:
SQLStmt = "INSERT INTO Messages (ForumID, ParentID, PosterID, Title, Body, Date) "
SQLStmt = SQLStmt & " VALUES (" & forumID & ", " & parentID & ", " & userID & ", '" & subject & "', '" & message & "', #" & Date() & "#)"
set RS = conn.Execute(SQLStmt)
Which when expanded prints something like:
INSERT INTO Messages (ForumID, ParentID, PosterID, Title, Body, Date) VALUES (22, 0, 1, 'Test', 'Test Text', #2/14/2002#)
This all works fine if I exclude the Date Field. The most descriptive error I get is:
Microsoft JET Database Engine (0x80040E14)
Syntax error in INSERT INTO statement.
Any help would be greatly appreciated
- X
|
|
|
|
|
I think you need to replace # signs with '. For example:
INSERT INTO Messages (ForumID, ParentID, PosterID, Title, Body, Date) VALUES (22, 0, 1, 'Test', 'Test Text', '2/14/2002')
|
|
|
|
|
I'm afraid that didn't work.
But, Alas! I found the solution! I changed the 'Date' field to 'DatePosted'. I presume 'Date' is a reserved word. It took me three hours to figure that out. Oh well.
Thanks for you help anyway
- X
|
|
|
|
|
Yup .. your right Date is a preserve word ... but by adding brackets [] it will work also like this [Date] .
Sometimes I use it when I have a field contain 2 words like [Date Posted]
|
|
|
|
|
I want to use mscomctl.ocx (tree) in intranet.
When some persone requesting site where this control is use mscomctl.ocx download and run.
But in some persone this control don't want to download.
help me.
I know that all people don't have this control.
Maybe this is only problem with properties in Security in Local Intranet. But every field is enabled.
How i can packing this to cab and give this all people in firm???
HELP ME !!!
Olek
|
|
|
|
|
Another think
I go to person, where the tree do not run.
I search registry and find that this control are registring as Treeview control.
What's hapend wiht that.
|
|
|
|
|
Hello,
If we try to upload a file from netscape 4.7 in which the file name contains non english characters, eg if the filename is in japanese then netscape gives error. Though this thing works fine thru' IE 5.0.
We are using WinNT 4.0 SP6 and also Win2K Adv server SP2.
Pl. help me solving the problem.
Regards,
A.
|
|
|
|
|
How do you minimize the browser window (Internet Explorer in this case) using client side script (VBscript or JavaScript) ?
Unfortunatley the JavaScript ResizeTo method is not an option.
Also preferably not using COM components, ActiveX etc. It does run on W2K but unfortunatley WSH (Windows Script Host) is also not an option.
thanks guys.
regards,
Paul Watson
Bluegrass
Cape Town, South Africa
"The greatest thing you will ever learn is to love, and be loved in return" - Moulin Rouge
Sonork ID: 100.9903 Stormfront
|
|
|
|
|
It looks like you are out of luck on this one. It seems that MS removed all the positioning methods and properties from the window object. No more MoveTo, MoveBy, ResizeTo, ResizeBy. They really don't want you to control the window anymore - I guess it is a security thing.
|
|
|
|
|
Konstantin Vasserman wrote:
It looks like you are out of luck on this one. It seems that MS removed all the positioning methods and properties from the window object. No more MoveTo, MoveBy, ResizeTo, ResizeBy. They really don't want you to control the window anymore - I guess it is a security thing.
Same conclusion I have come to Konstantin. The odd thing is that you can fully control the position, status, size and modal-properties of a browser window if you open it via script. i.e. You cannot control an already open window, but any window you open can be fully controlled.
regards,
Paul Watson
Bluegrass
Cape Town, South Africa
"The greatest thing you will ever learn is to love, and be loved in return" - Moulin Rouge
Sonork ID: 100.9903 Stormfront
|
|
|
|
|
Now I wonder why anyone would want to do that?
Huh Paul
Nish
Nish was here, now Nish has gone;
He left his soul, to turn you on;
Those who knew Nish, knew him well;
Those who didn't, can go to hell.
I like to on the Code Project
Sonork ID 100.9786 voidmain
www.busterboy.org
|
|
|
|
|
So who knows how to put ASP into XML elements without having to use &<test>l<test>t<test>;<test>% ?
e.g.:
<?xml version="1.0"?>
<page>
<title>BGCMS: Home</title>
<content>
<h1>Welcome to BGCMS</h1>
<p>
This is a wonderful <b>place!</b> <img src="test.gif"/>
</p>
<p>
The time is approximatley <%=Now()%>
</p>
</content>
</page>
If I run that through an XSL processor, or even validated the XML, naturally the parser goes haywire and tells me that <% is an inavalid way to start a new element.
And yes Konstantin, it is another confusing and weird question
regards,
Paul Watson
Bluegrass
Cape Town, South Africa
"The greatest thing you will ever learn is to love, and be loved in return" - Moulin Rouge
Sonork ID: 100.9903 Stormfront
|
|
|
|
|
Paul Watson wrote:
So who knows how to put ASP into XML elements without having to use <%?
So sometimes I wonder if I was born stupid, or whether my mother dropped me shortly after birth.
I figured it out and it is far easier than I imagined.
!CDATA is the way
e.g:
<?xml version="1.0"?>
<page>
<title>BGCMS: Home</title>
<content><![CDATA[
<h1>Welcome to BGCMS</h1>
<p>
This is a wonderful <b>place!</b> <img src="test.gif"/><br/> make love not war
</p>
<p><%=Now()%></p>]]>
</content>
</page>
!CDATA basically tells the XML parser to totally ignore everything within the !CDATA section. Very handy
regards,
Paul Watson
Bluegrass
Cape Town, South Africa
"The greatest thing you will ever learn is to love, and be loved in return" - Moulin Rouge
Sonork ID: 100.9903 Stormfront
|
|
|
|