|
You can get the page using WebClient class. Work with DownloadFile or DownloadString methods. After you got the page, use regular expressions to parse the page and find information needed.
|
|
|
|
|
How you want ot access the data from other third party websites?Is there some API exposed by that site?
Cheers!!
Brij
|
|
|
|
|
I retrived data in the following way to a string
protected void Page_Load(object sender, EventArgs e)
{
WebRequest req = null;
WebResponse rsp = null;
string uri = "http://www.ancestry.com/facts/gupta-family-history.ashx";
req = WebRequest.Create(uri);
rsp = req.GetResponse();
StreamReader reader = new StreamReader(rsp.GetResponseStream());
string strdata = reader.ReadToEnd();
}
Now the string strdata contains all the HTML code. If i want to retive the data between div tag how can i extract this from that string.?
G. Satish
|
|
|
|
|
Satish - Developer wrote: If i want to retive the data between div tag
how can i extract this from that string.?
Using regular expression as I said earlier.
|
|
|
|
|
hmmm, can you give an example to how to use div tag in regular expressions ?
G. Satish
|
|
|
|
|
Satish - Developer wrote: can you give an example to how to use div tag in regular expressions
DIV tag has no relation with regular expressions. Regular expressions are patterns used to find/replace specific text. It looks like you need a book on regular expressions. Try programs like RegExBuddy/Expresso which will help you to build regular expressions.
|
|
|
|
|
This question has bugger all to do with ASP.NET. ASP.NET is the one thing you can't possibly use to copy websites.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Hello everyone,
My problem is,
1. I want to let end user to fill-in an Excel file, which contains two columns, file description and file location on client side;
2. I want to let end user to upload the Excel file to my web server, then I want my web server to find the files specified in Excel file and upload them into web server.
Any documents or samples for me to start with?
thanks in advance,
George
|
|
|
|
|
George_George wrote: Any documents or samples for me to start with?
Yes !!
Check This[^]
This will help you.
cheers,
Abhijit
|
|
|
|
|
Thanks Abhijit,
I read this sample, but I think it is not what I want. I want the end user to submit an Excel file which contains all submit file items, and then the web application could automatically retrieve/upload the file items.
Any comments or ideas for my solution?
regards,
George
|
|
|
|
|
George_George wrote: I want to let end user to upload the Excel file to my web server, then I want my web server to find the files specified in Excel file and upload them into web server.
This is not possible in ASP.NET. ASP.NET sits on server and can't access any file in the client machine.
|
|
|
|
|
Thanks Navaneeth!
My confusion is, I want to provide a convenient user interface to end user. The end user needs to submit a lot of files and related description. I do not want to let them select them one by one and enter description one by one. I want them to submit all at once. So, it is why I want them to submit an Excel file.
Anyway, if you think my idea is not good enough, it is fine.
Then, what is your idea to achieve my goal of imporving user experience to submit a lot of materials?
regards,
George
|
|
|
|
|
George_George wrote: I want to provide a convenient user interface to end user
Since it is a web application, you have lot of restrictions in providing convenient user interface for upload. You have no other option than selecting files one by one. I have seen some flash based uploads which allows to select multiple files at one shot. But don't know how they did it as I don't know flash.
|
|
|
|
|
Thanks Navaneeth,
I am thinking of your solution seriously and finding alternative solutions. My current idea is to let end user submit a zip file which contains all individual files. But my concern is whether subsmit such big zip file will be slow and impact server performance? Any best practices or performance tuning technologies for uploading file to server?
regards,
George
|
|
|
|
|
Tell them to zip the materials and send a zip. Seriously, ASP.NET generates HTML, as Navaneeth said, without a java or flash control, there's no way you can do any different.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Thanks Christian,
Will it be slow if they send the zip file altogether to server?
regards,
George
|
|
|
|
|
George_George wrote: Will it be slow if they send the zip file altogether to server?
CG was joking, I believe. You can do what he said. But that will be slower than selecting each files and uploading. First of all you have to configure ASP.NET settings to allow large files. When the zip file successfully uploaded, you need to unzip it and place files in right place in the server.
At the end of the day you will notice that uploading files one by one is the most straightforward solution.
|
|
|
|
|
Thanks Navaneeth,
1.
I want to confirm with you whether do you think upload one big zip file is better or not, why? Sorry, I am confused.
2.
"First of all you have to configure ASP.NET settings to allow large files." -- do you have any documents about this?
regards,
George
|
|
|
|
|
George_George wrote: I want to confirm with you whether do you think upload one big zip file is better or not
That depends. As christian said, if your users will be uploading only text files or doc files, then zipping the file and uploading at one shot will be better. But if users will be uploading videos or images, no further compression is possible even if they zip it. So you don't find any difference.
George_George wrote: "First of all you have to configure ASP.NET settings to allow large files." -- do you have any documents about this?
It is a configuration entry in web.config file. You need to increase maximum request length allowed. See this[^]
|
|
|
|
|
Thanks Navaneeth!
I am thinking seriously about whether writing a client side program to upload file is better. But I do not know whether it is better because of my limited experience. Each time file upload size is big, may be several hundred M bytes, so I suspect the capability of uploading from browser.
What is your idea?
regards,
George
|
|
|
|
|
It depends. If it's a bunch of small files, then it will be fine. If they are a fair size, then you'll hit the wall of your page timing out. Either way, it will be faster if the files are text based ( that is, if they will zip to somethig a lot smaller ) and the same time if they are a png or something ( so, the file size is the same ). An advantage of a user sending a zip is, you'll know for sure you got it all, if you didn't, the zip will be invalid.
Requiring your users to make a zip is probably not ideal, but it's not a bad idea to support them.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Thanks Christian,
Compared with uploading one big zip file, do you have any better ideas for browser based solution? (I can not let client install any non-browser software, like FTP client to upload.)
regards,
George
|
|
|
|
|
hello eveyone..
how can i call or fire itemCommand using onclick in datagrid. im not using link button is that possible??
thanks...
jyn
|
|
|
|
|
You are spmming this site. 2 day back you have asked the same question. Now Today just one post back, Deleted that and asking for same questions.
Don't SPAM.
cheers,
Abhijit
|
|
|
|
|
hello...
sorry but im not asking the same question and im not a spammer.
jyn
|
|
|
|