Posts Tagged ‘ASP’

ASP.Net, XML, XSL-Transform

Monday, March 23rd, 2009

Here is a quick way to use ASP.Net to show some XML documents. One will find information such as Reponse.Write and stuff like that. Those information are for older version of ASP.Net when the xmlDocument was not implemented yet. So here is what one need:

In the aspx page, use the xmlDocument control:

<asp:Xml ID=”xmlDoc” runat=”server”></asp:Xml>

In the code page, use the following code in the page_load section:

if (File.Exists(Server.MapPath(e.Filename))){

xmlDoc.DocumentSource = Server.MapPath(e.Filename);
xmlDoc.TransformSource = Server.MapPath(“SC-SD-Transform.xsl”);
}

And it should be working fine now. You can also use events and such if you would rather not put it in the page_load section.

ASP.NET & GridViews

Sunday, March 22nd, 2009

New POC i need to do at work again. Again using ASP.NET, C# because I can’t get the web admin to actually install the PHP extensions I would like to use (such as the ones for PDO).

Gridviews have to be use, so I get to coding them and coding the associated SQL Procedures. And then I got the usual errors when trying to update an element in one of my gridviews. The error is because the SelectParameters names and the UpdateParameters names did not match.

GridView Select & Update parameters needs to have the same names! (Well at least that solved the problem)