I am using Selenium webdriver for UI automation purpose. Below is my sample code
IWebDriver driver = new OpenQA.Selenium.IE.InternetExplorerDriver();
string url ="http://stackoverflow.com";
driver.Navigate().GoToUrl(url);
string pagesource = driver.PageSource;
pagesource variable does not have the doctype. I need to know the DOCTYPE for W3C validation. Is there any way to get DOCTYPE of html source through selenium?
This thread shows there is no way to get the Doctype of html source through selenium, instead you can do a HTTP request from .net and get the DOCTYPE. I don't want to do a seperate HTTP request for getting DOCTYPE.
Using FirefoxDriver instead of InternetExplorerDriver will get you the DOCTYPE. Unfortunately this won't solve your problem - the source you're getting with driver.PageSource is already preprocessed by the browser, so trying to validate that code won't give reliable results.
Unfortunately there are no easy solutions.
If your page is not password protected you can use "validate by uri" method.
Otherwise you need to obtain page source. I know two ways of doing it (I implemented both in my project). One is to use proxy. If you are using C# take a look at FiddlerCore. Other way would be to make another request using javascript and XMLHttpRequest. You can find example here (search the page for XMLHttpRequest).
For W3C validation basically we have 3 issues if we automate through selenium webdriver.
Getting proper page source since driver.Pagesource is not reliable.
Getting doctype of HTML source.
Dealing with controls rendered through ajax calls. Since we cannot access these controls in page source how do we get the exact 'Generated source' of the page?
All the above things can be done by executing javascript through selenium web driver.
in a text file called 'htmlsource.txt' store this below code snippet.
function outerHTML(node){
// if IE, Chrome take the internal method otherwise build one as lower versions of firefox
//does not support element.outerHTML property
return node.outerHTML || (
function(n){
var div = document.createElement('div'), h;
div.appendChild( n.cloneNode(true) );
h = div.innerHTML;
div = null;
return h;
})(node);
}
var outerhtml = outerHTML(document.getElementsByTagName('html')[0]);
var node = document.doctype;
var doctypestring="";
if(node)
{
// IE8 and below does not have document.doctype and you will get null if you access it.
doctypestring = "<!DOCTYPE "
+ node.name
+ (node.publicId ? ' PUBLIC "' + node.publicId + '"' : '')
+ (!node.publicId && node.systemId ? ' SYSTEM' : '')
+ (node.systemId ? ' "' + node.systemId + '"' : '')
+ '>';
}
else
{
// for IE8 and below you can access doctype like this
doctypestring = document.all[0].text;
}
return doctypestring +outerhtml ;
And now the C# code to access the complete AJAX rendered HTML source with doctype
IJavaScriptExecutor js = (IJavaScriptExecutor)driver;
string jsToexecute =File.ReadAlltext("htmlsource.txt");
string completeHTMLGeneratedSourceWithDoctype = (string)js.ExecuteScript(jsToexecute);
Related
I have a question about how we can press control + s on any page of Chrome Webdriver using C# basically i have been trying to find the solution of this from past 2 days and have found nothing and still searching. if someone help me out with it. I wud appreciate that person.
here i the code which i have written:
string CaptchaSrc = driver.FindElement(By.XPath("//img[#class='captchaImage']")).GetAttribute("src");
Thread.Sleep(2000);
driver.Navigate().GoToUrl(CaptchaSrc);
driver.FindElement(By.TagName("body")).SendKeys(OpenQA.Selenium.Keys.Control + '\u0053');
Actions action = new Actions(driver); char S = '\u0053'; action.SendKeys(System.Windows.Forms.Keys.Control + Convert.ToString(S)).Build().Perform();
Thread.Sleep(4000);
System.Windows.Forms.SendKeys.SendWait(#"C:\Users\Blue\Downloads\" + captchaNumbering.ToString());
System.Windows.Forms.SendKeys.SendWait(#"{Enter}");
I have tried almost all the ways present on the StackOverFlow and even tried them all but nothing works for me. I just want to press Control + S after going to this src-URL of Image which i have scraped from the internet.
enter link description here
Maybe you can use Html Agility Pack for saving page or try this
.SendKeys(Keys.Control + "a")
.SendKeys(Keys.Control + String.valueOf('\u0053'))
If picture is appaer,you can use this code for example
string pagehtml = element.GetAttribute("innerHTML");
HtmlWeb page = new HtmlWeb();
HtmlDocument document = page.Load(pagehtml);
document.save("name.html");
I hope this example works.I didn't check but maybe shows your way for search.
I want to load html from WebClient() to selenium driver.
I have:
WebClient glavniklijent = new WebClient();
string HTML = glavniklijent.DownloadString("http://www.bodum.com/gb/en-us/shop/detail/10948-01/");
If I save it like local html file and then navigate on it
driver.Navigate().GoToUrl(localfile);
It wont help because then it will request online resources. Which take too long.
Also I tried with Javascript Executor
IJavaScriptExecutor js = driver as IJavaScriptExecutor;
string title = (string)js.ExecuteScript("document.write('" + HTML +"')");
But that don't work.
Reason why I do this is For me easiest way for parsing html is with Selenum driver, I tried with HtmlAgilityPack but I never used it before and it seems much complicated compared with Selenium Select By Id, Select by classname etc.
Can I load this with selenium locally ?
Is there html parser similar to selenium ?
Try CsQuery
https://github.com/jamietre/CsQuery
https://www.nuget.org/packages/CsQuery/
It makes parsing HTML pretty easy, in a way very similar to jQuery:
var document = CsQuery.CQ.CreateDocument(html);
foreach (var element in document.Select("ul.somelist > li.thread"))
{
// do something with element
}
I am trying to access these nodes
on this website.
http://bcres.paragonrels.com/publink/default.aspx?GUID=2033c143-cdf1-46b4-9aac-2e27371de22d&Report=Yes
however they appear to be in a secondary Html document within the initial one.
I am confused how I access the secondary html path and then parse through for the
this is an example of one of the nodes.
<div style="top:219px;left:555px;width:45px;height:14px;" id="" class="mls29">2</div>
I am using htmlAgility pack and I recieve null whenever I try to access Div.
I tried working my way down the nodes but It didn't work.
Any help or a place to look up the necessary information to figure this out would be appreciated
var webGet = new HtmlWeb();
var document = webGet.Load("http://bcres.paragonrels.com/publink/default.aspx?GUID=d27a1d95- 623d-4f6a-9e49-e2e46ede136c&Report=Yes");
var divTags = document.DocumentNode.SelectNodes("/html");
var text = document.DocumentNode.InnerText;
MessageBox.Show(text);
You will be able to scrape the data if you access the following url:
http://bcres.paragonrels.com/publink/Report.aspx?outputtype=HTML&GUID=2033c143-cdf1-46b4-9aac-2e27371de22d&ListingID=262103824:0&Report=Yes&view=29&layout_id=63
HtmlWeb w = new HtmlWeb();
var hd = w.Load("http://bcres.paragonrels.com/publink/Report.aspx?outputtype=HTML&GUID=2033c143-cdf1-46b4-9aac-2e27371de22d&ListingID=262103824:0&Report=Yes&view=29&layout_id=63");
var presentedBy = hd.DocumentNode.CssSelect(".mls23.at-phone-link");
if (presentedBy != null)
{
Console.WriteLine(presentedBy.FirstOrDefault().InnerText);
}
As an example, scraping the Presented By field:
Remarks:
I use ScrapySharp nuget package along with HtmlAgilityPack, so I can scrape using css selectors instead of xpath expressions - something I find easier to do.
The url you are scraping from is your problem. I am scraping from the last get request that is performed after the page is loaded, as you can see in the screenshot below, using Firefox developer tools to analyze the site traffic/network requests/responses:
I could not yet identify who/what triggers this http request in the end (may be by javascript code, may be via one of the frame htmls that are requested in the main document (the frame-enabled one).
If you only have a couple of urls like this to scrape, then even manually extracting the correct url will be an option.
Im trying to scrape a webpage using HTMLAgilityPack in a c# webforms project.
All the solutions Ive seen for doing this use a WebBrowser control. However, from what I can determine, this is only available in WinForms projects.
At present Im calling the required page via this code:
var getHtmlWeb = new HtmlWeb();
var document = getHtmlWeb.Load(inputUri);
HtmlAgilityPack.HtmlNodeCollection nodes = document.DocumentNode.SelectNodes("//div[#class=\"nav\"]");
An example bit of code that Ive seen saying to use the WebBrowser control:
if (this.webBrowser1.Document.GetElementsByTagName("html")[0] != null)
_htmlAgilityPackDocument.LoadHtml(this.webBrowser1.Document.GetElementsByTagName("html")[0].OuterHtml);
Any suggestions / pointers as to how to grab the page once AJAX has been loaded, will be appreciated.
It seems that using HTMLAgilityPack it is only possible to scrape content that is loaded via the html itself. Thus anything loaded via AJAX will not be visible to HTMLAgilityPack.
Perhaps the easiest option -where feasible- is to use a browser based tool such as Firebug to determine the source of the data loaded by AJAX. Then manipulate the source data directly. An added advantage of this might be the ability to scrape a larger dataset.
I struggled all day to get this right so here is a FedEx tracking example of what the accepted answer is referring to (I think):
Dim body As String
body = "data={""TrackPackagesRequest"":{""appType"":""WTRK"",""appDeviceType"":""DESKTOP"",""supportHTML"":true,""supportCurrentLocation"":true,""uniqueKey"":"""",""processingParameters"":{},""trackingInfoList"":[{""trackNumberInfo"":{""trackingNumber"":" & Chr(34) & "YOUR TRACKING NUMBER HERE" & Chr(34) & ",""trackingQualifier"":"""",""trackingCarrier"":""""}}]}}"
body = body & "&action=trackpackages&locale=en_US&version=1&format=json"
With CreateObject("MSXML2.XMLHTTP")
.Open("POST", "https://www.fedex.com/trackingCal/track", False)
.setRequestHeader("Referer", "https://www.fedex.com/apps/fedextrack/?tracknumbers=YOUR TRACKING NUMBER HERE")
.setRequestHeader("User-Agent", "Mozilla/5.0")
.setRequestHeader("X-Requested-With", "XMLHttpRequest")
.setRequestHeader("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8")
.send(body)
Dim Reply = .responseText
End With
Alternatively have you considered building a browser into your application using Cefsharp.net and then using Dev Tools through the .net interface?
You may have noticed that even dynamically AJAX/JS generated HTML can be found using e.g. Inspect Element option in Firefox. So that code is sitting on your computer even if you can't scrape it using traditional HTML scraping methods.
Another option to consider.
https://cefsharp.github.io/
I'm using Response.Redirect() to pass data (containing HTML) from one page to another. This works fine in Google Chrome but in Internet Explorer it said: "Couldn't find page!"
Does someone know what this is?
Thank you in advance
This is the URL:
string url = "Detailscherm.aspx?"
+ "melder=" + Server.UrlEncode(gv.SelectedRow.Cells[1].Text)
+ "&onderwerp=" + Server.UrlEncode(gv.SelectedRow.Cells[2].Text)
+ "&omschrijving=" + Server.UrlEncode(lblOmschrijving.Text)
+ "&fasedatum=" + Server.UrlEncode(gv.SelectedRow.Cells[4].Text)
+ "&outlookid=" + Server.UrlEncode(lblOutlookID.Text)
+ "&status=" + Server.UrlEncode(status)
+ "&niv1=" + Server.UrlEncode("")
+ "&niv2=" + Server.UrlEncode("");
Response.Redirect(url);
lblOmschrijving is a label which contains HTML-code
this is the value of URL right before Redirect:
"Detailscherm.aspx?melder=EBE&onderwerp=Test+feedback&omschrijving=%3chtml+xmlns%3ao%3d%22urn%3aschemas-microsoft-com%3aoffice%3aoffice%22+xmlns%3aw%3d%22urn%3aschemas-microsoft-com%3aoffice%3aword%22+xmlns%3d%22http%3a%2f%2fwww.w3.org%2fTR%2fREC-html40%22%3e%0d%0a%3chead%3e%0d%0a%3cmeta+http-equiv%3d%22Content-Type%22+content%3d%22text%2fhtml%3b+charset%3dutf-8%22%3e%0d%0a%3cmeta+name%3d%22Generator%22+content%3d%22Microsoft+Word+11+(filtered+medium)%22%3e%0d%0a%3cstyle%3e%0d%0a%3c!--%0d%0a+%2f*+Style+Definitions+*%2f%0d%0a+p.MsoNormal%2c+li.MsoNormal%2c+div.MsoNormal%0d%0a%09%7bmargin%3a0cm%3b%0d%0a%09margin-bottom%3a.0001pt%3b%0d%0a%09font-size%3a12.0pt%3b%0d%0a%09font-family%3a%22Times+New+Roman%22%3b%7d%0d%0aa%3alink%2c+span.MsoHyperlink%0d%0a%09%7bcolor%3ablue%3b%0d%0a%09text-decoration%3aunderline%3b%7d%0d%0aa%3avisited%2c+span.MsoHyperlinkFollowed%0d%0a%09%7bcolor%3apurple%3b%0d%0a%09text-decoration%3aunderline%3b%7d%0d%0aspan.E-mailStijl17%0d%0a%09%7bmso-style-type%3apersonal-compose%3b%0d%0a%09font-family%3aArial%3b%0d%0a%09color%3awindowtext%3b%7d%0d%0a%40page+Section1%0d%0a%09%7bsize%3a595.3pt+841.9pt%3b%0d%0a%09margin%3a70.85pt+70.85pt+70.85pt+70.85pt%3b%7d%0d%0adiv.Section1%0d%0a%09%7bpage%3aSection1%3b%7d%0d%0a--%3e%0d%0a%3c%2fstyle%3e%0d%0a%3c%2fhead%3e%0d%0a%3cbody+lang%3d%22NL%22+link%3d%22blue%22+vlink%3d%22purple%22%3e%0d%0a%3cdiv+class%3d%22Section1%22%3e%0d%0a%3cp+class%3d%22MsoNormal%22%3e%3cfont+size%3d%222%22+face%3d%22Arial%22%3e%3cspan+style%3d%22font-size%3a10.0pt%3b%0d%0afont-family%3aArial%22%3eMohamed%2c%3co%3ap%3e%3c%2fo%3ap%3e%3c%2fspan%3e%3c%2ffont%3e%3c%2fp%3e%0d%0a%3cp+class%3d%22MsoNormal%22%3e%3cfont+size%3d%222%22+face%3d%22Arial%22%3e%3cspan+style%3d%22font-size%3a10.0pt%3b%0d%0afont-family%3aArial%22%3e%3co%3ap%3e%26nbsp%3b%3c%2fo%3ap%3e%3c%2fspan%3e%3c%2ffont%3e%3c%2fp%3e%0d%0a%3cp+class%3d%22MsoNormal%22%3e%3cfont+size%3d%222%22+face%3d%22Arial%22%3e%3cspan+style%3d%22font-size%3a10.0pt%3b%0d%0afont-family%3aArial%22%3eIk+heb+zonet+enkele+zaken+getest.+De+testfeedback+is+opgenomen+in+de+bijlage.%3co%3ap%3e%3c%2fo%3ap%3e%3c%2fspan%3e%3c%2ffont%3e%3c%2fp%3e%0d%0a%3cp+class%3d%22MsoNormal%22%3e%3cfont+size%3d%222%22+face%3d%22Arial%22%3e%3cspan+style%3d%22font-size%3a10.0pt%3b%0d%0afont-family%3aArial%22%3e%3ca+href%3d%22file%3a%2f%2f%2f%5c%5cJUPITER%5cInformatica%5cProjecten%5cIntegratie%2520SLA%2520rapportering%2520op%2520IT%2520Helpdesk%2520mailbox%5c6.%2520Test%2520en%2520Training%5cTesten%2520Integratie%2520helpdesk%2520sla-%2520Opmerkingen.xls%22%3eO%3a%5cProjecten%5cIntegratie%0d%0a+SLA+rapportering+op+IT+Helpdesk+mailbox%5c6.+Test+en+Training%5cTesten+Integratie+helpdesk+sla-+Opmerkingen.xls%3c%2fa%3e%3co%3ap%3e%3c%2fo%3ap%3e%3c%2fspan%3e%3c%2ffont%3e%3c%2fp%3e%0d%0a%3cp+class%3d%22MsoNormal%22%3e%3cfont+size%3d%222%22+face%3d%22Arial%22%3e%3cspan+style%3d%22font-size%3a10.0pt%3b%0d%0afont-family%3aArial%22%3e%3co%3ap%3e%26nbsp%3b%3c%2fo%3ap%3e%3c%2fspan%3e%3c%2ffont%3e%3c%2fp%3e%0d%0a%3cp+class%3d%22MsoNormal%22%3e%3cfont+size%3d%222%22+face%3d%22Arial%22%3e%3cspan+style%3d%22font-size%3a10.0pt%3b%0d%0afont-family%3aArial%22%3eWe+zullen+hier+vanmiddag+samen+naar+kijken.%3co%3ap%3e%3c%2fo%3ap%3e%3c%2fspan%3e%3c%2ffont%3e%3c%2fp%3e%0d%0a%3cp+class%3d%22MsoNormal%22%3e%3cfont+size%3d%222%22+face%3d%22Arial%22%3e%3cspan+style%3d%22font-size%3a10.0pt%3b%0d%0afont-family%3aArial%22%3e%3co%3ap%3e%26nbsp%3b%3c%2fo%3ap%3e%3c%2fspan%3e%3c%2ffont%3e%3c%2fp%3e%0d%0a%3cp+class%3d%22MsoNormal%22%3e%3cfont+size%3d%222%22+face%3d%22Arial%22%3e%3cspan+style%3d%22font-size%3a10.0pt%3b%0d%0afont-family%3aArial%22%3eGroeten%2c%3co%3ap%3e%3c%2fo%3ap%3e%3c%2fspan%3e%3c%2ffont%3e%3c%2fp%3e%0d%0a%3cp+class%3d%22MsoNormal%22%3e%3cfont+size%3d%222%22+face%3d%22Arial%22%3e%3cspan+style%3d%22font-size%3a10.0pt%3b%0d%0afont-family%3aArial%22%3e%3co%3ap%3e%26nbsp%3b%3c%2fo%3ap%3e%3c%2fspan%3e%3c%2ffont%3e%3c%2fp%3e%0d%0a%3cp+class%3d%22MsoNormal%22%3e%3cfont+size%3d%222%22+face%3d%22Arial%22%3e%3cspan+style%3d%22font-size%3a10.0pt%3b%0d%0afont-family%3aArial%22%3eEric%3co%3ap%3e%3c%2fo%3ap%3e%3c%2fspan%3e%3c%2ffont%3e%3c%2fp%3e%0d%0a%3cp+class%3d%22MsoNormal%22%3e%3cfont+size%3d%222%22+face%3d%22Arial%22%3e%3cspan+style%3d%22font-size%3a10.0pt%3b%0d%0afont-family%3aArial%22%3e%3co%3ap%3e%26nbsp%3b%3c%2fo%3ap%3e%3c%2fspan%3e%3c%2ffont%3e%3c%2fp%3e%0d%0a%3cp+class%3d%22MsoNormal%22%3e%3cfont+size%3d%221%22+face%3d%22Arial%22%3e%3cspan+style%3d%22font-size%3a9.0pt%3b%0d%0afont-family%3aArial%3blayout-grid-mode%3aline%22%3e__________________________________________%3co%3ap%3e%3c%2fo%3ap%3e%3c%2fspan%3e%3c%2ffont%3e%3c%2fp%3e%0d%0a%3cp+class%3d%22MsoNormal%22%3e%3cfont+size%3d%221%22+face%3d%22Times+New+Roman%22%3e%3cspan+style%3d%22font-size%3a%0d%0a9.0pt%3blayout-grid-mode%3aline%22%3e%3co%3ap%3e%26nbsp%3b%3c%2fo%3ap%3e%3c%2fspan%3e%3c%2ffont%3e%3c%2fp%3e%0d%0a%3cp+class%3d%22MsoNormal%22%3e%3cfont+size%3d%221%22+face%3d%22Arial%22%3e%3cspan+style%3d%22font-size%3a9.0pt%3b%0d%0afont-family%3aArial%3blayout-grid-mode%3aline%22%3eEric+Op+de+Beeck%3c%2fspan%3e%3c%2ffont%3e%3cspan+style%3d%22layout-grid-mode%3aline%22%3e%3co%3ap%3e%3c%2fo%3ap%3e%3c%2fspan%3e%3c%2fp%3e%0d%0a%3cp+class%3d%22MsoNormal%22%3e%3cfont+size%3d%221%22+face%3d%22Arial%22%3e%3cspan+style%3d%22font-size%3a9.0pt%3b%0d%0afont-family%3aArial%3blayout-grid-mode%3aline%22%3eAfdelingshoofd+Informatica%3c%2fspan%3e%3c%2ffont%3e%3cfont+size%3d%222%22%3e%3cspan+style%3d%22font-size%3a10.0pt%3blayout-grid-mode%3aline%22%3e%3co%3ap%3e%3c%2fo%3ap%3e%3c%2fspan%3e%3c%2ffont%3e%3c%2fp%3e%0d%0a%3cp+class%3d%22MsoNormal%22%3e%3cfont+size%3d%221%22+face%3d%22Arial%22%3e%3cspan+style%3d%22font-size%3a9.0pt%3b%0d%0afont-family%3aArial%3blayout-grid-mode%3aline%22%3e%3ca+href%3d%22mailto%3aEric.Op.de.Beeck%40etaplighting.com%22+title%3d%22mailto%3aEric.Op.de.Beeck%40etaplighting.com%22%3eEric.Op.de.Beeck%40etaplighting.com%3c%2fa%3e%3co%3ap%3e%3c%2fo%3ap%3e%3c%2fspan%3e%3c%2ffont%3e%3c%2fp%3e%0d%0a%3cp+class%3d%22MsoNormal%22%3e%3cfont+size%3d%221%22+face%3d%22Times+New+Roman%22%3e%3cspan+style%3d%22font-size%3a%0d%0a9.0pt%3blayout-grid-mode%3aline%22%3e%3co%3ap%3e%26nbsp%3b%3c%2fo%3ap%3e%3c%2fspan%3e%3c%2ffont%3e%3c%2fp%3e%0d%0a%3cp+class%3d%22MsoNormal%22%3e%3cfont+size%3d%221%22+face%3d%22Arial%22%3e%3cspan+style%3d%22font-size%3a9.0pt%3b%0d%0afont-family%3aArial%3blayout-grid-mode%3aline%22%3eAntwerpsesteenweg+130+-+B-2390+Malle%3co%3ap%3e%3c%2fo%3ap%3e%3c%2fspan%3e%3c%2ffont%3e%3c%2fp%3e%0d%0a%3cp+class%3d%22MsoNormal%22%3e%3cfont+size%3d%221%22+face%3d%22Arial%22%3e%3cspan+style%3d%22font-size%3a9.0pt%3b%0d%0afont-family%3aArial%3blayout-grid-mode%3aline%22%3eTel.+03+310+02+11+-+Fax+03+311+61+42%3co%3ap%3e%3c%2fo%3ap%3e%3c%2fspan%3e%3c%2ffont%3e%3c%2fp%3e%0d%0a%3cp+class%3d%22MsoNormal%22%3e%3cfont+size%3d%221%22+face%3d%22Arial%22%3e%3cspan+lang%3d%22EN-GB%22+style%3d%22font-size%3a%0d%0a9.0pt%3bfont-family%3aArial%3bletter-spacing%3a.5pt%3blayout-grid-mode%3aline%22%3eBTW+BE+0424+980+655+RPR+Antwerpen%3c%2fspan%3e%3c%2ffont%3e%3cfont+size%3d%221%22+face%3d%22Arial%22%3e%3cspan+lang%3d%22EN-GB%22+style%3d%22font-size%3a9.0pt%3bfont-family%3aArial%3blayout-grid-mode%3aline%22%3e%3co%3ap%3e%3c%2fo%3ap%3e%3c%2fspan%3e%3c%2ffont%3e%3c%2fp%3e%0d%0a%3cp+class%3d%22MsoNormal%22%3e%3cu%3e%3cfont+size%3d%221%22+color%3d%22blue%22+face%3d%22Arial%22%3e%3cspan+lang%3d%22EN-GB%22+style%3d%22font-size%3a9.0pt%3bfont-family%3aArial%3bcolor%3ablue%3blayout-grid-mode%3aline%22%3ewww.etaplighting.com%3c%2fspan%3e%3c%2ffont%3e%3c%2fu%3e%3cfont+size%3d%221%22+face%3d%22Arial%22%3e%3cspan+lang%3d%22EN-GB%22+style%3d%22font-size%3a9.0pt%3bfont-family%3aArial%3b%0d%0alayout-grid-mode%3aline%22%3e%3co%3ap%3e%3c%2fo%3ap%3e%3c%2fspan%3e%3c%2ffont%3e%3c%2fp%3e%0d%0a%3cp+class%3d%22MsoNormal%22%3e%3cfont+size%3d%221%22+face%3d%22Arial%22%3e%3cspan+style%3d%22font-size%3a9.0pt%3b%0d%0afont-family%3aArial%3blayout-grid-mode%3aline%22%3e__________________________________________%3c%2fspan%3e%3c%2ffont%3e%3cfont+size%3d%221%22+face%3d%22Arial%22%3e%3cspan+style%3d%22font-size%3a9.0pt%3bfont-family%3aArial%3blayout-grid-mode%3a%0d%0aline%22%3e%3co%3ap%3e%3c%2fo%3ap%3e%3c%2fspan%3e%3c%2ffont%3e%3c%2fp%3e%0d%0a%3cp+class%3d%22MsoNormal%22%3e%3cfont+size%3d%223%22+face%3d%22Times+New+Roman%22%3e%3cspan+style%3d%22font-size%3a%0d%0a12.0pt%22%3e%3co%3ap%3e%26nbsp%3b%3c%2fo%3ap%3e%3c%2fspan%3e%3c%2ffont%3e%3c%2fp%3e%0d%0a%3c%2fdiv%3e%0d%0a%3c%2fbody%3e%0d%0a%3c%2fhtml%3e%0d%0a&fasedatum=21%2f03%2f2011+12%3a08%3a13&outlookid=AAMkAGI2MGM0NjY2LTI5MGYtNGVmMC1iMTg2LThlZDNmODFhZDIwNQBGAAAAAAC5W4YdHHPkSL1VgU1WnUztBwD2It7i8bOLTI4%2fH%2bc6MwEsAC0BCIilAAD2It7i8bOLTI4%2fH%2bc6MwEsAC0M%2b0T9AAA%3d&status=0&niv1=&niv2="
The length of the querystring is too long. I.E. Only accepts up to 2083 characters. Chrome and others do not. I have had a similar problem.
Try using Server.Transfer(), or put the variables in session or post a form.
Session["melder"] = Server.UrlEncode(gv.SelectedRow.Cells[1].Text);
Session["onderwerp"] = Server.UrlEncode(gv.SelectedRow.Cells[2].Text);
...
Response.Redirect("Detailscherm.aspx");
You can then fetch these values back on that page
string melder = Session["melder"];
Session["melder"] = "";
In any case, it does not seem like a very good idea to put all that data in a querystring. If anyone changes the values in the address bar, it could make your pages show incorrect data.
Try using sessions, or Post to carry large amounts of data across pages.
try this
string value = "../containing html";
Response.Redirect("http://www.mysite.com/?Value=" + Server.UrlEncode(value));
HTTP Get length, that Google Chrome and Internet Explorer supports is different.
IE only support 2083 characters.
Google Chrome support 8182 characters.
Safari Browser support 80,000.
Opera Browser support 190,000.