Hi all,
I want to download images,css,js files referenced by a webpage. I am doing this by downloading the HTML of webpage and getting all the URL references in the html and using URL and WebRequest downloading the images and css files. Is there any better way of doing this.Its taking a long time with my method.
Any suggestions will be great thaking you...
User Profile
Collapse
-
How to download images,css,js files of webpage
-
Adding attribute to the parentnode of text node
Hi
I am walking xml using c# and i want add attribute (style="text-decoration: line-through;" ) to the parent node of text node if the value meets some condition.
e.g if this element <div >include</div> as include doesn't contain "read" i want <div style="text-decoration: line-through;">inclu de</div>
Here is wht i am doing... -
document.doctype is always returning null c#
HI
i am trying to get the doctype of a html document using the following code
document = (HTMLDocument)w ebBrowser.Docum ent;
string url = document.url; // This line is working
string doctype = document.doctyp e.ToString();//this line is always null
am i implementing doctype correctly or do i have to do differently.Can any one please help me. -
acessing webconfig file in aspx page
Hi
I am trying to acess my webconfig file in aspx page .I know we can acess in code behind using
ConfigurationMa nager.Connectio nStrings["siteurl"].ConnectionStri ng;
but i want to acess in aspx page
<div id="both" onclick="do('bo th');" > Hello</div>
onn onclick i want to call javascript function do( ) and pass the parameter by reading... -
i found the answer using regex options which is very useful
string regex = "<script(.* ?)</script>";
RegexOptions options = (RegexOptions.I gnorePatternWhi tespace | RegexOptions.Si ngleline | RegexOptions.Ig noreCase);
Regex reg = new Regex(regex, options);
string rep= reg.Replace(inp ut, "anil"); -
Regular expression to replace including new line
Hi
I am trying to replace anything between <script> </script> tags including script, I am using the following regular expression
Regex.Replace(i nput, @"<script\b[^>]*>(.*?)<\ /script>", " ");
But the problem is if there is a newline
e.g:- <scirpt> sample
</script>
Its not working because "." matches... -
jambalapamba started a topic How to retain the values entered by the user in home page in other pages asp.netin .NETHow to retain the values entered by the user in home page in other pages asp.net
Hi all
In my webpage i have search option with advanced options on home page but in the subsequent pages i have only search without any advanced options. When user uses the search button other than home page i want to search using the advanced options entered by the user in the home page. I always want to search using the latest advanced options entered by the user. Can any one help me. -
s i am checking that thank you i think thats the mistake i am doing thank you for ur help i am going to change the code and let u know whether it works or notLeave a comment:
-
when ever i find style attribute in a element with the condition hidden i will be skipping that entire element and i will be reading next nodeLeave a comment:
-
no its not because its not reading <a3> only if it reads a3 then it goes in to the
nodetype.elemen t loop and skips it, but the problem is its not reading <a3> it is going to the value. Everytime i skip an element its not reading next element tag its reading the value.Leave a comment:
-
I am really sorry skip method skips entire element my code is not displaying "first" and "second". The skip method skips entire element and its children as well.Leave a comment:
-
Its printing "other first" and "other second" but i want to skip "includeme" as well because its element value of <a3> tag which i want to skip all the child nodes inside <a3> element....Leave a comment:
-
XmlNodeReader.Skip Method not working as expected
I am trying to skip element in xml document where style attribute is VISIBILITY: hidden or DISPLAY: none.
In the following example i want to skip the last two elements but when i skip the element with id=”Div1”
and next reader.Read() reads “ includeme” but i expected it to read element <a id ="Div2" style="visibili ty:hidden "> and skip it instead... -
perfomance issues of dynamically removing node from document
Hi
I am removing node from a document depending on the style property and this is taking 7 seconds for checking complete document is there any ideas how can i improve the perfomance. Here is my part of code
foreach (IHTMLElement tempElement in document.all)
{
if (tempElement.st yle.visibility == "hidden" )
{
... -
regular expression
Hi
I want to check in string src="nil.jpg" after src=" is there a letter with p if not then replace replace="nil.jp g"
I am using regular expression
Regex.Replace(s , "(src=\\W[^p])", @"replace="" );
The problem is i am getting replace="il.jpg " I am loosing the first letter in this case 'n' , i want it to be replace="nil.jp g"... -
Regular Expression not replacing
hi
I am using regular expression to replace all the hardcoded strings in html page
e.g.eg: http://google.com/aref/film.html should be replace/film.html
I am using reg expreesion ((http://){1})((\\S(\\.) ?)+/)
Its working but in every html page when it encounters <html xmlns="http://www.w3.org/1999/xhtml" >
<head>
Its replacing <html xmlns="replace/head>... -
-
access denied when trying to acess document in iframe
hi all
i am loading a html document in my iframe which comes from the same domain, when i am trying to acess the document(html page) in the iframe using java script i am getting access denied , but some times its not giving me error and i am able access the document. its inconsistent like some time it gives me error and sometimes not(for the same document). Inside the html document its refering to the website images that... -
-
Thank you very much its not exactly working what i wanted but atleast i can tweak it around when i run the pattern you gave me this is what i got
http://www.start.com/startservice/abcd hello ello yellow/ fdsadfassdf http://helo/
was replaced by
abcd hello ello yellow/ fdsadfassdf but i wanted it to be
startservice/abcd hello ello yellow/ fdsadfassdf
i will take it from here . Thank you very much for your...Leave a comment:
No activity results to display
Show More
Leave a comment: