[{"data":1,"prerenderedAt":380},["ShallowReactive",2],{"article-testing-web-serviceasmx-remotely-yes-you-can":3},{"article":4,"tags":157,"previous":172,"next":256},{"id":5,"title":6,"author":7,"body":8,"createdAt":146,"description":147,"extension":148,"img":147,"meta":149,"navigation":150,"path":151,"seo":152,"stem":153,"tags":154,"updatedAt":146,"__hash__":156},"articles\u002Farticles\u002Ftesting-web-serviceasmx-remotely-yes-you-can.md","Testing Web Service(ASMX) Remotely (yes, you can!)","[object Object]",{"type":9,"value":10,"toc":142},"minimark",[11,15],[12,13,14],"p",{},"Often we test web services by either locally on our workstations or remoting to the server and accessing the asmx page. ",[12,16,17,18,137,138],{},"If you try to access the asmx remotely however you are not given the option to test the server (by using the server url address).  By adding the following code the \u003Csystem.web> section of asmx web site web.config you can now test your services remotely.  ",[19,20,24,38,55,70,84,98,116,130],"span",{"className":21,"style":23},[22],"Apple-style-span","word-spacing: 0px; font: 12px\u002F15px verdana; text-transform: none; color: rgb(51,51,51); text-indent: 0px; white-space: normal; letter-spacing: normal; border-collapse: separate; text-align: left; orphans: 2; widows: 2; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0",[25,26,27],"em",{},[28,29,31],"font",{"size":30},3,[28,32,34,35],{"face":33},"Calibri","\u003CwebServices>",[36,37],"br",{},[25,39,40],{},[28,41,42],{"size":30},[28,43,44,52,53],{"face":33},[19,45,46,47],{},"       ",[19,48,51],{"className":49},[50],"Apple-converted-space"," ","\u003Cprotocols>",[36,54],{},[25,56,57],{},[28,58,59],{"size":30},[28,60,61,67,68],{"face":33},[19,62,63,64],{},"           ",[19,65,51],{"className":66},[50],"\u003Cadd name=\"HttpSoap12\"\u002F>",[36,69],{},[25,71,72],{},[28,73,74],{"size":30},[28,75,76,81,82],{"face":33},[19,77,63,78],{},[19,79,51],{"className":80},[50],"\u003Cadd name=\"HttpSoap\"\u002F>",[36,83],{},[25,85,86],{},[28,87,88],{"size":30},[28,89,90,95,96],{"face":33},[19,91,63,92],{},[19,93,51],{"className":94},[50],"\u003Cadd name=\"HttpGet\"\u002F>",[36,97],{},[25,99,100],{},[28,101,102],{"size":30},[28,103,104,110,113,114],{"face":33},[19,105,106,107],{},"         ",[19,108,51],{"className":109},[50],[19,111,112],{},"  ","\u003Cadd name=\"HttpPost\"\u002F>",[36,115],{},[25,117,118],{},[28,119,120],{"size":30},[28,121,122,127,128],{"face":33},[19,123,46,124],{},[19,125,51],{"className":126},[50],"\u003C\u002Fprotocols>",[36,129],{},[25,131,132],{},[28,133,134],{"size":30},[28,135,136],{"face":33},"\u003C\u002FwebServices>","  ",[19,139,141],{"className":140,"style":23},[22],"The above code addresses the issue related to \"The test form is only available for requests from the local machine.\" error message.",{"title":143,"searchDepth":144,"depth":144,"links":145},"",2,[],"2015-04-20T08:07:17.9200000-04:00",null,"md",{},true,"\u002Farticles\u002Ftesting-web-serviceasmx-remotely-yes-you-can",{"title":6,"description":147},"articles\u002Ftesting-web-serviceasmx-remotely-yes-you-can",[155],"aspnet","SxKDc8JlqMksiHb_H-HoXeE2EcSX8ZxEqtt1Yn_DRPQ",[158],{"id":159,"title":160,"body":161,"description":165,"extension":148,"img":166,"meta":167,"name":155,"navigation":150,"path":168,"seo":169,"stem":170,"__hash__":171},"tags\u002Ftags\u002Faspnet.md","Aspnet",{"type":9,"value":162,"toc":163},[],{"title":143,"searchDepth":144,"depth":144,"links":164},[],"ASP.NET is an open source web framework, created by Microsoft, for building modern web apps and services with .NET.","https:\u002F\u002Fimages.unsplash.com\u002Fphoto-1598313183973-4effcded8d5e?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=675&q=80",{},"\u002Ftags\u002Faspnet",{"description":165},"tags\u002Faspnet","SlUGLdZWQy8mYOWC6OetgJkwVulWNURoVHeuESIDleI",{"id":173,"title":174,"author":7,"body":175,"createdAt":247,"description":147,"extension":148,"img":248,"meta":249,"navigation":150,"path":250,"seo":251,"stem":252,"tags":253,"updatedAt":247,"__hash__":255},"articles\u002Farticles\u002Fstring-literals-and-c.md","String Literals and C#",{"type":9,"value":176,"toc":245},[177,180,203,212,233,236],[12,178,179],{},"I was looking for some utility that would take a very long string and convert it to vb.net or c# with line continuation(s) characters. String literals to the rescue.  C# supports two forms of string literals: regular string literals and verbatim string literals. ",[12,181,182,183,190,191,198,199,202],{},"A ",[184,185,186],"strong",{},[187,188,189],"u",{},"regular string literal"," consists of zero or more characters enclosed in double quotes, as in ",[192,193,194,195,194],"code",{},"\"",[192,196,197],{},"hello",", and may include both simple escape sequences (such as ",[192,200,201],{},"\\t"," for the tab character) and hexadecimal and Unicode escape sequences. ",[12,204,205,206,208,209,211],{},"In c# regular strings can only span multiple lines with syntax similar to the following: string sql = “SELECT customer “ +",[36,207],{},"\n“FROM customers “ +",[36,210],{},"\n“WHERE custId=10”;",[12,213,182,214,219,220,223,224,227,228,232],{},[184,215,216],{},[187,217,218],{},"verbatim string literal"," consists of an ",[192,221,222],{},"@"," character followed by a double-quote character, zero or more characters, and a closing double-quote character. A simple example is ",[192,225,226],{},"@\"hello\"",". In a verbatim string literal, the characters between the delimiters are interpreted verbatim, the only exception being a ",[229,230,231],"i",{},"quote-escape-sequence",".",[12,234,235],{},"In particular, simple escape sequences and hexadecimal and Unicode escape sequences are not processed in verbatim string literals.  The above sample can be replaced with the ‘literal’ designated by the @ symbol as follows:",[12,237,238,239,241,242,244],{},"string sql = @“SELECT",[36,240],{},"\nFROM customers",[36,243],{},"\nWHERE custId=10”;",{"title":143,"searchDepth":144,"depth":144,"links":246},[],"2015-04-20T08:07:18.0100000-04:00","\u002Farticles\u002Fimages\u002FF0VD2LVE2v.png",{},"\u002Farticles\u002Fstring-literals-and-c",{"title":174,"description":147},"articles\u002Fstring-literals-and-c",[254],"csharp","wR7AFv2jyIEaMk54IdB_kd0WIeTKqKzKljWKic55QNQ",{"id":257,"title":258,"author":7,"body":259,"createdAt":372,"description":373,"extension":148,"img":147,"meta":374,"navigation":150,"path":375,"seo":376,"stem":377,"tags":378,"updatedAt":372,"__hash__":379},"articles\u002Farticles\u002Fcss-lost.md","CSS Lost, Missing, Absent, Gone after Postback in Asp.NET",{"type":9,"value":260,"toc":370},[261,264,267,270,277,280,283],[12,262,263],{},"I have a generic function in one of my helper libraries that allows me to open a new browser window when a button is selected.  \nThe button posts back to the server runs some code and opens a new window.  \nI often use this sort of thing on a reporting page allowing me to post some search criteria and open a new window (a pdf report).",[12,265,266],{},"I found this type of helper function useful however I found that I was losing my CSS after the postback.",[12,268,269],{},"To avoid losing the css keep the following in mind:",[271,272,273],"ul",{},[274,275,276],"li",{},"ensure that your css files are included declarative in your aspx page (not through code behind)",[12,278,279],{},"use Page.ClientScript.RegisterStartupScript(this.GetType(),”name”,script); (Not Response.Write)",[12,281,282],{},"The end helper function looks something like the following:",[284,285,287,288,287,303,310,311,287,322,344,345,344,360,344,367,299],"div",{"style":286},"font-size: 9pt; background: white; color: black; font-family: consolas","   \n",[12,289,291,292,296,300],{"style":290},"margin: 0px","    ",[19,293,295],{"style":294},"color: gray","\u002F\u002F\u002F",[19,297,299],{"style":298},"color: green"," ",[19,301,302],{"style":294},"\u003Csummary>",[12,304,291,305,307],{"style":290},[19,306,295],{"style":294},[19,308,309],{"style":298}," redirect to a new page from codebehind","  \n",[12,312,291,313,315,317,320],{"style":290},[19,314,295],{"style":294},[19,316,299],{"style":298},[19,318,319],{"style":294},"\u003C\u002Fsummary>",[19,321,291],{"style":298},[12,323,291,324,299,328,299,331,334,335,338,339,343],{"style":290},[19,325,327],{"style":326},"color: blue","static",[19,329,330],{"style":326},"public",[19,332,333],{"style":326},"void"," RedirectToNewWindow(",[19,336,337],{"style":326},"string"," url, System.Web.UI.",[19,340,342],{"style":341},"color: #2b91af","Page"," page) {        ","    ",[12,346,347,348,350,351,355,356,359],{"style":290},"        ",[19,349,337],{"style":326}," script = ",[19,352,354],{"style":353},"color: #a31515","\"\u003Cscript>window.open('\""," + url + ",[19,357,358],{"style":353},"\"');\u003C\u002Fscript>\"",";",[12,361,362,363,366],{"style":290},"        page.ClientScript.RegisterStartupScript(page.GetType(), ",[19,364,365],{"style":353},"\"redirectscript\"",",script);        ",[12,368,369],{"style":290},"    }",{"title":143,"searchDepth":144,"depth":144,"links":371},[],"2015-04-20T08:07:17.8100000-04:00","I have a generic function in one of my helper libraries that allows me to open a new browser window when a button is selected.",{},"\u002Farticles\u002Fcss-lost",{"title":258,"description":373},"articles\u002Fcss-lost",[155],"b2i1IqyW2Q653DvjckNBJxu4yY2Re8ejfAldTtUJY3I",1781574761798]