Search Results

Search found 14593 results on 584 pages for 'pat inside'.

Page 40/584 | < Previous Page | 36 37 38 39 40 41 42 43 44 45 46 47  | Next Page >

  • Encode double quotes inside XML element using LINQ to XML

    - by davekaro
    I'm parsing a string of XML into an XDocument that looks like this (using XDocument.Parse) <Root> <Item>Here is &quot;Some text&quot;</Item> </Root> Then I manipulate the XML a bit, and I want to send it back out as a string, just like it came in <Root> <Item>Here is &quot;Some text&quot;</Item> <NewItem>Another item</NewItem> </Root> However, what I am getting is <Root> <Item>Here is \"Some text\"</Item> <NewItem>Another item</NewItem> </Root> Notice how the double quotes are now escaped instead of encoded? This happens whether I use ToString(SaveOptions.DisableFormatting); or var stringWriter = new System.IO.StringWriter(); xDoc.Save(stringWriter, SaveOptions.DisableFormatting); var newXml = stringWriter.GetStringBuilder().ToString(); How can I have the double quotes come out as &quot; and not \"? UPDATE: Maybe this can explain it better: var origXml = "<Root><Item>Here is \"Some text&quot;</Item></Root>"; Console.WriteLine(origXml); var xmlDoc = System.Xml.Linq.XDocument.Parse(origXml); var modifiedXml = xmlDoc.ToString(System.Xml.Linq.SaveOptions.DisableFormatting); Console.WriteLine(modifiedXml); the output I get from this is: <Root><Item>Here is "Some text&quot;</Item></Root> <Root><Item>Here is "Some text"</Item></Root> I want the output to be: <Root><Item>Here is "Some text&quot;</Item></Root> <Root><Item>Here is "Some text&quot;</Item></Root>

    Read the article

  • (C# ) Reloading flash files inside a windows form

    - by user257412
    Using visual C# express 2008. I have a app which shows load a flash movie in form, using this code axShockwaveFlash1 = new AxShockwaveFlashObjects.AxShockwaveFlash() axShockwaveFlash1.LoadMovie(0, Form1.currentGame); The problem is that when the Loadmovie method is called to load another flash file, without closing the form , the new flash is 'messed' up. to be more specific , it seems that the background and some controls of the previous flash still remain, 'spoiling' the new flash that is loaded. why? Using the following methods before loading the second flash video makes no difference axShockwaveFlash1.Refresh(); axShockwaveFlash1.Stop(); Solution ?

    Read the article

  • Naming of ASP.NET controls inside User Controls with ASP.NET MVC

    - by skb
    I am wondering if there is a way to make ASP.NET controls play nicely with my ASP.NET MVC app. Here is what I am doing. I have an order page which displays info about a single Order object. The page will normally have a bunch of rows of data, each row representing an OrderItem object. Each row is an ASP.NET User Control. On the user control there is a form element with two text boxes (Quantity and Price), and an update button. When I click the update button, I expect the form to post the data for that individual OrderItem row to a controller method and update the OrderItem record in the database. Here is my problem: When the post happens, the framework complains because the fields on the form don't match the parameters on the controller method. Each form field is something like "OrderItem_1$Quantity" or "OrderItem_2$Price" instead of just "Quantity" or "Price" which would match my method parameters. I have been told that I can overcome this by making sure that the IDs of all my controls are unique for the page, but allow the NAMEs to be repeated between different forms, so that if a form for an individual row is posted, the name can be something that will match what is on my controller method. The only problem is that I am using ASP.NET controls for my text boxes (which I REALLY want to continue doing) and I can't find any way to override the name field. There is no Name propery on an ASP.NET control, and even when I try to set it using the Attributes accessor property by saying "control.Attributes["Name"] = "Price";" it just adds another name= attribute to the HTML tag which doesn't work. Does any one know how I can make this work? I really don't like all of the HtmlHelper functions like TextBox and DropDown because I hate having my .aspx be so PHP or ASP like with the <%% tags and everything. Thanks!

    Read the article

  • WPF binding only inside XAML (simple question)

    - by 0xDEAD BEEF
    Why this works <myToolTip:UserControl1> <TextBlock Text="{Binding Path=TestString, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type myToolTip:UserControl1}}}"/> </myToolTip:UserControl1> BUT this does not <myToolTip:UserControl1 x:Name="userControl"> <TextBlock Text="{Binding Path=TestString, ElementName=userControl}"/> </myToolTip:UserControl1> and is there realy no shorter (faster) fay, to acces usercontrols elements?! Sincerely, 0xDEAD BEEF

    Read the article

  • How to post Source Code inside a Wordpress blog post

    - by jasondavis
    I just started a coding related wordpress bog to basicly discuss topics and store code snippets in. I installed a code syntax highlighter plugin which is very nice but I am having a problem. I just tried posting my first code related blog post and wordpress seems to only post some of my code and then it makes some of it not show, like it filters some of it out even though I am wrapping it in tags like this.. <pre class="brush:php"> <?PHP my code ?> </pre> Some of my code works and some gets filtered out somehow. I know this is possible as many wordpress coding sites show source code. Do I need to modify something to make it work in wordpress? UPDATE I have confirmed that it does save ALL my code into the database it just filters it out when it try to print to screen, so when I go in to edit the post and textbox populates with ALL the source code intact

    Read the article

  • How to group data in PHP inside the while loop

    - by christian
    I query in a database and loop the result using while and heres the sample data retrieve: echo $db->f("FirstName")."===".$db->f("Question")."=".$db->f("Answer")."<br>"; Michael===Q2=allergy Michael===Q2=Hives Michael===Q6=A lot Michael===Q8_A=Daktacort Michael===Q1=Itch Michael===Q5=Smoke Michael===Q8_A=Diprogenta Christian===Q1=Stuffy Christian===Q6=A lot Christian===Q1=Clear Christian===Q5=Pollen How can I group them according to name and to their Q value? I want something like this result: Name Q1 Q2 ..... so on and so fort. Michael Itch Hives, Allergy Christian Stuffy

    Read the article

  • Storing information inside YAML

    - by yuval
    I looked through the YAML for ruby documentation and couldn't find an answer. I have a list of several employees. Each has a name, phone, and email as such: Employees: Name | Phone | Email john 111 [email protected] joe 123 [email protected] joan 321 [email protected] How would I write the above information in YAML to end up with the following ruby output? employees = [ {:name => 'john', :phone => '111', :email => '[email protected]'}, {:name => 'joe', :phone => '123', :email => '[email protected]'}, {:name => 'joan', :phone => '321', :email => '[email protected]'} ] This is how I parse the YAML file: APP_CONFIG = YAML.load_file("#{RAILS_ROOT}/config/config.yml") Thank you!

    Read the article

  • Debugging: Attach to Process for Console App running inside cmd.exe

    - by Chris
    How do you "Attach to Process..." for a console application thats running from a CMD window and not launched by F5? The reason I ask is because the application takes command line arguments and I want to have a genuine experience. I've even attaching to CMD.exe, but no luck, or setting a break-point using Console.ReadKey() with also no luck. I'm kind of at a loss here. Is this possible?

    Read the article

  • Detect Applet context (am I inside an applet?)

    - by 7macaw
    Hi, I'm wondering if there's a way for a Java class to figure out if it is being used within an applet? That is, I have a library (a .jar file) that can be used by 3rd-party applications and applets. It does work within applets, but I'd like to do some things differently, depending on whether or not the library is used in an applet - like show applet-applicable errors, avoid local file I/O, etc. It would be nice if, say, Applet.getAppletContext() was static so that I could call it (and get NULL or not NULL) even if I don't have an applet instance, but alas, it isn't. Is there any other way?

    Read the article

  • Display ASP.NET GridView inside a selected row in another GridView

    - by Justin C
    I have been given a mockup that I do not know is possible to code in ASP.NET without being a real html and javascript wizard. I want a GridView that when a row is selected, the selected row expands and below the selected row a panel of additional information is shown, which would also include another small GridView. The idea is this would all be in-line. So if the user selected row 4, then the additional information would appear below row 4 and then after the additional information the parent GridView would continue with row 5. Ultimately I would want to do a multi-select type of set up, but first I need to figure out if this is even possible. Also, the solution must be 508 Compliant The one solution I considered was using only one "column". Then I would put all my fields in the ItemTemplate, and my detail panel content in the EditItemTemplate and instead of selecting the row, set it to edit mode. The problem with this solution is I lose the functionality of multiple columns if I throw everything in one huge ItemTemplate. Any and all suggestions or ideas are appreciated.

    Read the article

  • Nesting gridview/formview in webuser control inside a parent gridview

    - by Stuart
    Hi, I'm developing an ASP.net 2 website for our HR department, where the front page has a matrix of all our departments against pay grades, with links in each cell to all the jobs for that department for that grade. These links take you a page with a gridview populated dynamically, as each department has a different number of teams, e.g. Finance has one team, IT has four. Each cell has a webuser control inserted into it. The user control has a sql datasource, pulling out all the job titles and the primary key, popuating a formview, with a linkbutton whose text value is bound to the job title. (I'm using a usercontrol as this page will also be used to show the results of a search of all roles in a range of grades for a department, and will have a varying number of rows). I've got everything to display nicely, but when I click on the linkbutton, instead of running the code I've put in the Click event, the page posts back without firing any events. Having looked around, it looks like I have to put an addhandler line in somewhere, but I'm not sure where, could anyone give me some pointers please? (fairly numpty please, I'm not too experience in ASP yet and am winging it. I'm also using VB but C# isn't a problem) This is how I'm inserting the controls into the parent grid, have I missed anything obvious? For row As Int16 = 0 To dgvRoleGrid.Rows.Count - 1 tempwuc = New UserControl tempwuc = LoadControl("wucRoleList.ascx") tempwuc.ID = "wucRoleList" & col.ToString tempwuc.EnableViewState = True dgvRoleGrid.Rows(row).Cells(col).Controls.Add(tempwuc) CType(dgvRoleGrid.Rows(row).FindControl(tempwuc.ID), wucRoleList).specialtyid = specid CType(dgvRoleGrid.Rows(row).FindControl(tempwuc.ID), wucRoleList).bandid = dgvRoleGrid.DataKeys(row)(0) CType(dgvRoleGrid.Rows(row).FindControl(tempwuc.ID), wucRoleList).familyid = Session("familyid") Next

    Read the article

  • WPF Expander Button Styled so it is inside Expander Header

    - by Burt
    I am using the expander control and have styled the header as shown in the picture below. The problem I have is that I want the expander button to be contained within the header so that the line for the end of the header template aligns with the Expander content i.e. I ultimatly want to end up with something similar to the image below. Thanks in advance.

    Read the article

  • Getting fill color inside the itemrenderer in Adobe Flex

    - by Anoop
    Hi All, I am writing a custom item renderer to render a column series in my application. Its a stacked chart and i want to use the same item renderer for both the column series. The color for each series in the stack is different and am setting that in the 'fill' property of the two series. My doubt is how can i get the color specified in the fill property of the column series from the item renderer. if this works then i can very well use the same renderer for both series. Thanks in advance, Anoop

    Read the article

  • manipulate objects outside svg with javascript-function inside the svg

    - by Christian Benke
    Hello! I'm embedding a svg-graphic on my website and i'd like to manipulate the rest of the website with javascript-commands which are in the svg - though i'm not sure if this is possible. Let me elaborate: I've got a worldmap in svg, i want to click on a country and this click should run an ajax-call and load relevant information of this country into a div in the html site where the svg is embedded. "onclick="location.href='xxx'"" redirects to the respective site which is fine, but i'd prefer to run a js-function that fetches the site with ajax - but running a javascript-function in the svg only seems to work for functions and elements defined in the svg, not outside of it. Is it basically possible to manipulate anything outside the svg through a js-function in the svg? How? Regards Christian

    Read the article

  • QueryInterface fails at casting inside COM-interface implementation

    - by brecht
    I am creating a tool in c# to retrieve messages of a CAN-network (network in a car) using an Dll written in C/C++. This dll is usable as a COM-interface. My c#-formclass implements one of these COM-interfaces. And other variables are instantiated using these COM-interfaces (everything works perfect). The problem: The interface my C#-form implements has 3 abstract functions. One of these functions is called -by the dll- and i need to implement it myself. In this function i wish to retrieve a property of a form-wide variable that is of a COM-type. The COM library is CANSUPPORTLib The form-wide variable: private CANSUPPORTLib.ICanIOEx devices = new CANSUPPORTLib.CanIO(); This variable is also form-wide and is retrieved via the devices-variable: canreceiver = (CANSUPPORTLib.IDirectCAN2)devices.get_DirectDispatch(receiverLogicalChannel); The function that is called by the dll and implemented in c# public void Message(double dTimeStamp) { Console.WriteLine("!!! message ontvangen !!!" + Environment.NewLine); try { CANSUPPORTLib.can_msg_tag message = new CANSUPPORTLib.can_msg_tag(); message = (CANSUPPORTLib.can_msg_tag) System.Runtime.InteropServices.Marshal.PtrToStructure(canreceiver.RawMessage, message.GetType()); for (int i = 0; i < message.data.Length; i++) { Console.WriteLine("byte " + i + ": " + message.data[i]); } } catch (Exception e) { Console.WriteLine(e.Message); } } The error rises at this line: message = (CANSUPPORTLib.can_msg_tag)System.Runtime.InteropServices.Marshal.PtrToStructure(canreceiver.RawMessage, message.GetType()); Error: Unable to cast COM object of type 'System.__ComObject' to interface type 'CANSUPPORTLib.IDirectCAN2'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{33373EFC-DB42-48C4-A719-3730B7F228B5}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)). Notes: It is possible to have a timer-clock that checks every 100ms for the message i need. The message is then retrieved in the exact same way as i do now. This timer is started when the form starts. The checking is only done when Message(double) has put a variable to true (a message arrived). When the timer-clock is started in the Message function, i have the same error as above Starting another thread when the form starts, is also not possible. Is there someone with experience with COM-interop ? When this timer

    Read the article

  • Tab bar controller inside a navigation controller, or sharing a navigation root view

    - by Daniel Dickison
    I'm trying to implement a UI structured like in the Tweetie app, which behaves as so: the top-level view controller seems to be a navigation controller, whose root view is an "Accounts" table view. If you click on any account, it goes to the second level, which has a tab bar across the bottom. Each tab item shows a different list and lets you drill down further (the subsequent levels don't show the tab bar). So, this seems like the implementation hierarchy is: UINavigationController Accounts: UITableViewController UITabBarController Tweets: UITableViewController Detail view of a tweet/user/etc Replies: UITableViewController ... This seems to work[^1], but appears to be unsupported according to the SDK documentation for -pushViewController:animated: (emphasis added): viewController: The view controller that is pushed onto the stack. It cannot be an instance of tab bar controller. I would like to avoid private APIs and the like, but I'm not sure why this usage is explicitly prohibited even when it seems to work fine. Anyone know the reason? I've thought about putting the tab bar controller as the main controller, with each of the tabs containing separate navigation controllers. The problem with this is that each nav controller needs to share a single root view controller (namely the "Accounts" table in Tweetie) -- this doesn't seem to work: pushing the table controller to a second nav controller seems to remove it from the first. Not to mention all the book-keeping when selecting a different account would probably be a pain. How should I implement this the Right Way? [^1]: The tab bar controller needs to be subclassed so that the tab bar controller's navigation item at that level stays in sync with the selected tab's navigation item, and the individual tab's table controller's need to push their respective detail views to self.tabBarController.navigationController instead of self.navigationController.

    Read the article

  • HTML inside webView

    - by Samuh
    I am posting some data to a server using DefaultHttpClient class and in the response stream I am getting a HTML file. I save the stream as a string and pass it onto another activity which contains a WebView to render this HTML on the screen: response = httpClient.execute(get); InputStream is = response.getEntity().getContent(); BufferedReader br = new BufferedReader(new InputStreamReader(is,"utf-8")); StringBuffer sb = new StringBuffer(); String line; while((line=br.readLine())!=null){ sb.append(line); sb.append("\n"); } is.close(); Intent intent = new Intent(this,Trial.class); intent.putExtra("trial",sb.toString()); startActivity(intent); Log.i("SB",sb.toString()); In Second Activity, the code to load the WebView reads: WebView browser = ((WebView)findViewById(R.id.trial_web)); browser.getSettings().setJavaScriptEnabled(true); browser.loadData(html,"text/html", "utf-8"); When I run this code, the WebView is not able to render the HTML content properly. It actually shows the HTML string in URL encoded format on the screen. Interestingly, If I copy the Loggers output to HTML file and then load this HTML in my WebView(using webview.loadurl(file:///assets/xyz.html)) everything works fine. I suspect some problem with character encoding. What is going wrong here? Please help. Thanks.

    Read the article

  • SQL Server: Profiling statements inside a User-Defined Function

    - by Craig Walker
    I'm trying to use SQL Server Profiler (2005) to track down some application performance problems. One of the calls being made is to a table-valued user-defined function. This function wraps a select that joins several tables together. In SQL Server Profiler, the call to the UDF is logged. However, the select that underlies the UDF isn't being logged at all. Because of this, I'm not getting useful data on which tables & indexes are being hit. I'd like to feed this info into the Database Tuning Advisor for some indexing advice. Is there any way (short of unwrapping the queries themselves) to log the tables called by UDFs in Profiler?

    Read the article

  • Set ActiveTabIndex on Ajax TabContainer inside CompositeControl

    - by MADCookie
    I am creating a CompositeControl in VB ASP.NET. My control has an Ajax TabContainer with several TabPanels. I need to code it so a value on the querystring can set the container's ActiveTab. Regardless of the querystring piece of this issue, in my CreateChildControl code, I am setting the ActiveTabIndex to a valid index position, but the UI still has the index 0 as active. Any tips? Any help?

    Read the article

  • LoginView inside FormView control is not databinding on PostBack

    - by subkamran
    I have a fairly simple form: <asp:FormView> <EditItemTemplate> <asp:LoginView> <RoleGroups> <asp:RoleGroup roles="Blah"> <ContentTemplate> <!-- Databound Controls using Bind/Eval --> </ContentTemplate> </asp:RoleGroup> </RoleGroups> </asp:LoginView> <!-- Databound Controls --> </EditItemTemplate> </asp:FormView> <asp:LinqDataSource OnUpdating="MyDataSource_Updating" /> I handle my LinqDataSource OnUpdating event and do some work handling some M:N fields. That all works. However, once the update is finished (and I call e.Cancel = true), the LoginView control does not databind its children... so they are all blank. The FormView's viewstate is still fine, as all the rest of the controls outside of the LoginView appear fine. I even handle the FormView_DataBound event and a Trace shows that the FormView is being databound on postback. Why then is the LoginView not keeping its ViewState/being databound? Here's a sample code snippet showing the flow: protected void MyDataSource_Updating(object s, LinqDataSourceUpdateEventArgs e) { try { Controller.DoSomething(newData); // attempts to databind again here fail // frmView.DataBind(); // MyDataSource.DataBind(); // LoginView.DataBind(); } catch { // blah } finally { e.Cancel = true; } }

    Read the article

  • Jquery flowplayer - tabs - content inside div tags not displaying

    - by Gublooo
    Hey guys, I'm looking for a simple example of JQuery tabs in which I am planning to show two different forms. I came across this example http://flowplayer.org/tools/demos/tabs/index.htm which is perfect for my needs. So I implemented the simple example. The code in question is: <div class="panes" <divFirst tab content. Tab contents are called "panes"</div <divSecond tab content</div <divThird tab content</div </div Now my content for the first tab is a form which has several of its own div tags - when I put that form with div tags as the content for the first tab - nothing appears. So I made a simple change and added another div tag to the content of the first tab as shown below and still nothing appears: <div class="panes" <div<divFirst tab content. Tab contents are called "panes"</div</div <divSecond tab content</div <divThird tab content</div </div Is there a simple way to fix this. This is the content that I want to display in my first tab - Thanks for your help <div id="formbox" class="formbox" <form id="shopping_form" method="post" <div id="3" style="width:520px;" <textarea id="message" name="message" rows="3" cols="50"</textarea </div <div id="store_row" style="width:220px;float:left;padding-bottom:10px;"<bStore</b <input type="text" id="store" name="store" class="required" size="20" / <input type="hidden" id="store_id"/ </div <div id="city_column" style="width:200px;float:left;padding-bottom:10px;"<bCity</b <input type="text" id="city" name="city" size="15"/ </div <div id="findbutton_column" style="vertical-align:top;width:80px;float:left;" <input class="find_address" id="findaddress" type="button" value="Find Store"/ </div <div id="googlerow" style="width:120px;float:left;padding-bottom:10px;" <bSelect Store</b<select id="google_stores" name="google_stores"</select <input type="hidden" id="google_address"/ </div <div id="google_message" style="float:left;padding-bottom:10px;display:none;"</div <div id="locationrow" style="float:left;padding-bottom:10px;display:none;" <bAddress/Country</b <input type="text" id="address" name="address" size="20" / <input type="text" id="country" name="country" size="20"/ </div <div style="width:520px;float:left;padding-bottom:10px;" <bPrice    <input type="text" id="price" name="price" size="20" / </div <div id="buttonrow" style="width:200px;float:right;display:none;" <input id="it" type="image" src="http://images.pe.com.s3.amazonaws.com/it.png" height="35px"/ </div </form </div

    Read the article

  • ExtJS: Adding table inside a dynamically added tab

    - by esskar
    Hi, i'm fairly new to ExtJS. I adopted some examples and added the functionality to add tabs to a tab-control by clicking on some link. so far so good. now i want to load a ExtJS table into on of the new tabs. the items (rows, columns) are defined in a database on the server side. can you give me some hints how to add the table automatically when the tab is created?

    Read the article

  • Asp.net ajax library preview 6 (Ajax toolkits inside a dataview)

    - by Thurein
    Hi, I was using the sys.ui.dataview, ado.net data services and a html page to provide an edit page. It was working fine, but when I wanted to apply some ACT features, for instance watermark or autocomplete on a textbox (input) within the dataview div, its not applied. However, when I move that text box, out of the div, it is working fine and the watermark effect was applied. Am I doing something wrong or any advice ? Thanks

    Read the article

< Previous Page | 36 37 38 39 40 41 42 43 44 45 46 47  | Next Page >