How can I do this using XmlDocument?I want readability over performance, and I find XmlReader to be hard to read b/c you have to keep checking the node type.
public class Package { public Package() { name = ""; type = new List<Dictionary<string, string>>(); } public string name { get; set; } public List<Dictionary<string, string>> type { get; set; } } [code]...
can i add string builder object to a dictionary object? If yes code it. I mean i have a dictionary in which i have already added a few (string, objects), and i have a string Builder which has few variable already added now i want that instead of passing 2 different object in a method i want to pass only one object so can i add string builder object to same method as well
At debug time I would like to see what are the keys in my InitParams collection - I can't seem to be able to list them.
EDIT:As Jon suggests below, this might be a bug within the Silverlight debugger. To reproduce, just create a new Silverlight Application within Visual Studio 2010 and just edit code
{ public partial class MainPage : UserControl { [code]...
I am trying to use aspx pages as an email templates. There will likely be a bunch of objects on the page which will be used as replacements in the html. Because it's an aspx page I'll be able to use databinding, repeaters, etc. At run time, I want to be able to instantiate the aspx page from its path, pass in a bunch of properties, and then get the rendered result of the page and email it. This seems pretty straightforward from a asp.net website (maybe using BuildManager or Server.Execute.) However, I want to be able to use the same templates via a console application by just loading up a page object from its filepath. Is this possible?
on VWD 2005 this code works fine, but on 2008 it says I haven't created an instance of the object. I want to convert the object connString (a connection string) into a string.
'This acceses the virtual directory web.config file for connection strings 'We have to convert the object to a connection string Dim rootWebConfig As System.Configuration.Configuration rootWebConfig = System.Web.Configuration.WebConfigurationManager.OpenWebConfiguration("/VirtualDirec") Dim connString As System.Configuration.ConnectionStringSettings connString = rootWebConfig.ConnectionStrings.ConnectionStrings("ConnectString1") Dim strConnString As String = connString.ToString().......
<%@ Import Namespace="System.Data.SqlClient" %> <script runat="server" > Dim connStr As String = ConfigurationManager.ConnectionStrings("cc").ConnectionString.ToString dim db As New Data.SqlClient.SqlConnection(connStr)
why this error
Object reference not set to an instance of an object.
I need to write a system to generate HTML email from a data model -
I was going to create a templating system to build the model into an HTML representation using HTML 'fragments' stored in an xml template. But it occurs to me that these it might be better to use asp or asp.net than write my own templating system?
What I am wondering is whether/how it would be possible to use asp (maybe asp.net mvc?) to return an HTML string - I wouldn't be running on a web server, or in response to an HTTP request.
I have not done any asp or asp.net yet- My experience of ASP stretches to 'Create new project' in visual studio -
I would like to create the XML string on the the aspx page and then submit this request using the YUI ajax request to another aspx page for the processiong. So
1. is this possible by setting some of the ajax requests configurations like we do on ajax response ?
I´m currently programming a web search application in ASP.Net and having problem with full text searching. My requirements are:
1. Save a byte array from SQL server to word document as a temp file in a server side?
2. How to highlight the string I am currently searching in the Word document and return to the user the sentence with the highlighted string (like on Bing or any other search engines)? Is it possible to fullfill this requirement with full-text search integrated in SQL Server 2008?
I have a label "lbl1" that I am trying to locate in a content page from the Master page. I want to do it dynamically so I am trying to pass the name of the control (which in this case is lbl1) through as a parameter. I don't get an error, it just doesn't work. If I do an alert to see what the string "temp" looks like, it is correct, but iit seems as if Javascript ignores it. I believe it has something to do with the '<%= not being interpreted correctly by the browser I'm sure it is a simple solution, but I can't figure it out!
I have a gridview inside a user control bind to an object datasource. Now I want to bind the object datasource with a parameter from parent page. For this purpose I defined a public property in user control but how do I pass it with object datasource? I am calling from parent page like myusercontrol.parameter=querystring["id"]; How to bind object datasource with my parameter?
I have a page with some datasources in it. I am doing reenginering of the page itself and would like to split some parts of the page in several user controls. In my code I have an ObjectDataSource object with the following params
This piece of code automatically bind the hidden field "txtAlbumId" to the datasource. In my revision this datasource should be moved to a user control. What is the best way to handle a scenario like this?
</textarea></p> <input type='hidden' name='ID[7]' value='34389' /> <input type='hidden' name='URL[7]' value='http://forums.asp.net/t/1627446.aspx' /> <input type='hidden' name='CAT[7]' value='Web Forms' /> <input type='hidden' name='BOARD[7]' value='microsoft' /> <input type='hidden' name='P_DATE[7]' value='Nov 26, 2010 08:25 PM' /> <input type='hidden' name='RANDOM[7]' value='UEVLcNi9r' /> <input type='hidden' name='REPLIES[7]' value='4' /> <input type='hidden' name='USER[7]' value='aziz' /> <p><input class=subject type='text' size='90' name='SUBJECT[7]' value='Web Forms :: How to parse a string variable for diplay in control' /><select name='INDEXED[7]'><option value='1' selected>UPDATE</option><option value='2'>DELETE</option></select>Nov 26, 2010 08:25 PM - Replies: 4 CAT: Web Forms<a target=_blank href="http://forums.asp.net/t/1627446.aspx">View</a></p> <p> <textarea rows=10 cols=100 name='POST[7]' onfocus='setSelRange(this, 0, 0)'/> How can i display the string variable data "234,345,567,678" into a listbox?
i wish to parse the delimited string as seperate items.
the string can vary in length. </textarea></p> <input type='hidden' name='ID[8]' value='175584' /> <input type='hidden' name='URL[8]' value='http://stackoverflow.com/questions/2866868/datasource-select-parameter-from-get-value' /> <input type='hidden' name='CAT[8]' value='ASP.NET' /> <input type='hidden' name='BOARD[8]' value='stackoverflow' /> <input type='hidden' name='P_DATE[8]' value='May 19 10 at 15:21' /> <input type='hidden' name='RANDOM[8]' value='XYAWdt1ps' /> <input type='hidden' name='REPLIES[8]' value='1' /> <input type='hidden' name='USER[8]' value='aziz' /> <p><input class=subject type='text' size='90' name='SUBJECT[8]' value='c# - DataSource Select Parameter from GET value' /><select name='INDEXED[8]'><option value='1' selected>UPDATE</option><option value='2'>DELETE</option></select>May 19 10 at 15:21 - Replies: 1 CAT: ASP.NET<a target=_blank href="http://stackoverflow.com/questions/2866868/datasource-select-parameter-from-get-value">View</a></p> <p> <textarea rows=10 cols=100 name='POST[8]' onfocus='setSelRange(this, 0, 0)'/>How can I use the value of a GET form value as a SelectParameter?
I just like to know how to pass a parameter to the datasource of my dllItemCodeFooter and dllItemCodeEdit Drowndownlist which calls my getItemCodeList(decimal categoryID) method in the code behind. The value of the parameter will be seletectedValue of the first dropdownlist ddlCategoryFooter or ddlCategoryEdit).I know it could be done in code behind, but i prefer to bind my datasource in asp page. I want to achieve something like this DataSource='<%# getItemCodeList(ddlCategoryEdit.Seletected)%>'
how can i load the contents of an xml file at a url into a string? eg there is an xml file at [URL] I want the text of the xml to be assigned to a string. How can i do that using c#?
I am retrieving the HTML source code from a remote URL via C#. I am storing the html in a string. I would like to parse through it, but do not want to use RegEx. Instead of want to leverage the jQuery engine to parse through it. Is this possible somehow?
This is how I getting the html from the remote url:
HttpWebRequest wr = (HttpWebRequest)WebRequest.Create(url); string html = (new StreamReader(wr.GetResponse().GetResponseStream())).ReadToEnd();
I found the Fizzler library [URL], but it does not use the jQuery engine so there is a lot of things missing from it. Any suggestions on how to do this properly?