|
kyledunn wrote:
I need some help resolving this warning. Can you help?
Try this:
protected override void Render(HtmlTextWriter writer)
{
XmlDocument xdoc = new XmlDocument();
xdoc.Load(Context.Server.MapPath(sourceFilePath));
XPathNavigator nav = xdoc.CreateNavigator();
XslTransform xslt = new XslTransform();
xslt.Load(Context.Server.MapPath(transformFilePath));
xslt.Transform(nav, null, writer);
}
-Nick Parker
|
|
|
|
|
Thank you Nick!
I did need to use an XPathNavigator but even then the error message about using XmlResolver still appeared. Upon further research I found that XmlResolver is a argument in the Transform method.
Transform(XPathNavigator, XsltArgumentList, TextWriter, XmlResolver);
I still have no clue as to when or why to use a XmlResolver but found when I inserted a null for the arguemnt that the error disappeared.
Transform(nav,null,writer,null);
I suspect you can create custom resolvers to influence the Transform but that's for another day. Problem solved. Thank you.
Kyle
|
|
|
|
|
I need combo1 tied to tableA 'customers'
table is ID, Name
I need combo2 tied to tableB 'Stores"
table is CustomerID, Store Number
what is the best way to tie these together?
|
|
|
|
|
Hello,
I want to allow the user to edit columns but not delete or add new columns..
How can I do this??
Note: The read-only attribute allows me to edit, delete and add rows.. how can I only enable the "edit" without the "delete" and "add"
Thank you!!
|
|
|
|
|
defaultview.allownew = false;
|
|
|
|
|
Hi,
Does anyone know/ recommends an installer for distributing C# windows applications??
Does the installer make sure the .net framework is installed??
|
|
|
|
|
You can use the install wizard that comes with Visual Studio .NET (that is if you use VS.net) & it does check for .net framework installation...
If you are looking for a professional install maker try InstallShield. It is a powerful tool for creating MSI installers.
|
|
|
|
|
I have a form with a combo box and I dont wnat text editing at all. How do I guard against it?
|
|
|
|
|
|
but i want to allow them to choose from the list
|
|
|
|
|
Set the DropDownStyle property to DropDownList.
|
|
|
|
|
I need combo1 tied to tableA 'customers'
table is ID, Name
I need combo2 tied to tableB 'Stores"
table is CustomerID, Store Number
what is the best way to tie these together?
|
|
|
|
|
|
but I'm binding to table with ID, Name with the displaymember on name and value on id. how would I databing to the ID?
|
|
|
|
|
|
When the windows is shown, it will take focus.
What I did was call native fun GetActiveWindow()
do a show and then call SetActiveWindow(activeWindow)
|
|
|
|
|
You can use AK's suggestion, or you can use the ShowWindow() API with the SW_SHOWNOACTIVATE flag.
[DllImport("user32.dll")]
protected static extern bool ShowWindow(IntPtr hWnd,int nCmdShow);
protected const int SW_SHOWNOACTIVATE = 4;
"Blessed are the peacemakers, for they shall be called sons of God." - Jesus
"You must be the change you wish to see in the world." - Mahatma Gandhi
|
|
|
|
|
I am sure the answer to this question is simple...but I sure haven't found an answer on my own.
In my spare time, just to relax, I've been coding the Conway Life algorithm. I am currently doing a fairly good, and fast display of the Automaton generations growth. However I want to incorporate scaling as well as a much larger viewing world than I have today.
The problem I have is getting a graphic control implemented that supports scroll bars. I am currently using a PictureBox control which supports both the drawing of the ellipses as well as recognizing the mouse_down event.
Do I have to blend a picture box with another control to get it to present scroll bars? Or is their another graphic control I can deploy? The basic idea here is I have a fixed windowed area, with buttons in a GroupBox to control the generation machine (turn on/off/load pattern/etc) and the graphic window to show the generations.
At the moment the graphics are tightly bound to the fixed array I'm using but I want to alter my algorithm to use blocks in a list with a hashtable for lookup similar to how Allen Hensel is doing it in Java. This will support up to 4 million generations for a 'mover' which requires a movable graphic window.
Thanks to anyone that can answer this!
MJ
_____________________________________________
The world is a dangerous place. Not because of those that do evil, but because of those who look on and do nothing.
|
|
|
|
|
|
Everybody here has probably used :
MessageBox.Show("Hello");
The problem I am working on is that when you create a message box in this way it puts an 'OK' button and this button has focus so if you press return it closes the box.
Is there a way to display a messagebox where the 'OK' button doesnt have focus, therefore forcing the user to click the button?
|
|
|
|
|
doesnt that violate the user experience rules?
but just inherit the thing and impose your own rules.
|
|
|
|
|
Yes it does, but for my sins (I must have been really evil in a past life) the users I code for ask for the strangest things.
I use message box to display certain bits of information and the users are simply pressing return without reading the message as 99% of the time they 'know' what it will say, unfortunatly for me and them 1% of the time the message is different and if they dont acknowledge what it tells them it spams everything they are working on.
So in an attempt to rein in my users, I want to force them to click - its about as much as I can do, short of writing an ElectrocuteUser class (which would be nice )
In the end I did what you suggested and used inheritence, ho hum, tomorrow is just another weird request away.
|
|
|
|
|
well cool. What I did before .net was alive was made my own MessageBox form and used enums to imitate it.
you might try that cause then you can get a custom type message box
|
|
|
|
|
Ans actually you might even think of using error providers and more validation to make thier life more hell and make yours easier.
|
|
|
|
|
Hi!
How to properly add attachment to new Outlook.MailItem ?
I've made it that way:
this.mail.Attachments.Add(FileName,1, null, fname);
It looks correct, I can also save this attachment by calling
this.mail.Attachments.Item[i].SaveAsFile(FileName);
but the problem is that attachments are not sent with the message (or maybe they are included, but not "visible" in outlook).
Any ideas?
thanx
h.
|
|
|
|