|
rekha242000 wrote:
thanks for the reply but I would like to do it programmatically.
Well, using XSL or creating a new document *would* be doing it programatically. How else would it be ?
rekha242000 wrote:
I will be given two node id's and i want to be able to exchange them, meaning interchange their position in the xml document.
Well, you can't. Sorry. The DOM does not allow for it, unless you pull them out and stuff them back in. That's what XSL is for, I just gave the other option in case you did not know XSL.
Christian
I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
|
|
|
|
|
Is there a way for getting a command line options for C# compiler (csc.exe) from Visual Studio .NET 2002 project?
I need it to compile my project using .NET Framework 1.1 (since VS.NET 2002 doesn't support it and I don't have money for 2003 one).
It would be ok if my project has about 2-3 source files .. but it has about 80 source files and writing it down by hand is not very practical.
Thanx
--------
Dave
[Math Studio] A Computer Algebra System
|
|
|
|
|
|
well .. that's nice
But the code is also structured into folders ... anyway, I have already written an utility for generating commnad line for csc.
--------
Dave
|
|
|
|
|
David Sehnal wrote:
I have already written an utility for generating commnad line for csc.
Will there be an article on it?
|
|
|
|
|
OK, I'll try to make it more user friendly an publish it.
--------
Dave
[Math Studio] A Computer Algebra System
|
|
|
|
|
I want to have the possibility to enter a math algebric expression (e.g. z=sin(x*y-1)+x/y-2*x) and values for the variables (e.g. x=2.1, y=0.2) during execution of my program in WINDOWS environment.
Is that possible?
|
|
|
|
|
I'm strating a CCW object on a server side. How can I get a full path to dll file in one of the CCW methods?
Thanks,
vital.
|
|
|
|
|
You mean, so that unmanaged code can get the path of the .NET control via it's CCW that the runtime created? One way is to have a COM-callable method (declared in your class interface) that returns it's own path (perhaps using this.GetType().Assembly.Location . Getting the path through native COM functions can be a bit tricky.
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
Hello.
Help, please.
I'm trying to call a CCW object from an asp file. I registered a CCW with regasm.exe and then installed with gacutil.exe.
So, in asp is written:
try
{
objCheck = Server.CreateObject(rstData.Fields("LibName").Value);
blnAllowed = (objCheck.Permissions() & 0x01 != 0);
}
catch(e)
{
%>
/*
// LibName: <%=rstData.Fields("LibName").Value%>
// ERROR: <%=e.description%>
*/
<%
blnAllowed = false;
}
And I get an error:
// LibName: OilMiningBalance.Rep_Struct
// ERROR: Object reference not set to an instance of an object.
The name of CCW is correct, but then what's the matter with it?
vital
|
|
|
|
|
bva_bva wrote:
The name of CCW is correct, but then what's the matter with it?
The error is stating you are trying to access a variable/object that you haven't declared yet. Try declaring objCheck before calling Server.CreateObject .
-Nick Parker
DeveloperNotes.com
|
|
|
|
|
Nick Parker wrote:
The error is stating you are trying to access a variable/object that you haven't declared yet. Try declaring objCheck before calling Server.CreateObject
objCheck is declared as follows:
var strSQL, rstData, objCheck, blnAllowed;
strSQL = "SELECT Id, LibName, ShowProhibited" +
" FROM PrintDoc";
rstData = dbConf.Execute(strSQL);
, but it isn't working yet.
|
|
|
|
|
How do we associate a file type with an application.
Plus how do we add our own items to the context menu ( not in the application)?
Like winzip ..when u right click a folder it provides the option of zipping...
how do we do that for our application??
|
|
|
|
|
I believe creating an .MSI setup project will allow you to do associate file types. MSDN has lots of information on this.
Adding custom items to the sytem context menu will probably require some registry modification. Search this forum or google, I'm sure it has come up in the past.
The graveyards are filled with indispensible men.
|
|
|
|
|
While MSI does allow you to create those (like the other poster stated), you don't have to use that. Even then, you must still add the file type associations to the package project.
You should first understand how these are done, because you could even have your application do this the first time it starts up, or even ensure that it owns the association (but you should ask the user for such an option, sort of like Windows Media Player, QuickTime, and RealOne do). See the MSDN article, Introduction to File Associations[^], for more information.
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
I have a framework that allows me to create a wizard, by dynamically loading controls. I've found a similar framework on the web, in VB.NET. Mine is successfull at maintaining viewstate in the postback, so I can store/renew the data. The other one stores data in session state (yuck), but also maintains viewstate. This other one, however, can catch click messages in user controls that are dynamically loaded ( so I have a user control for the wizard, it shows user controls for pages, and a page contains a user control, with a button/click event ). I converted it from VB to C#, and now it does not catch click events either. Is this a bug in the C# implimentation, or am I missing something else ? I've tried to impliment IPostBackHandleEvent and it does not get called, I've tried assigning my click event in the ascx and in code. I have worked on it all weekend, and am now desperate and very sad.
|
|
|
|
|
does the page actually do a reload, but without firing the event? I have seen this, normally due to mysteryously disappearing eventhandlers. If I remembe correctly, i had to add the references to the back end file of the controls, and everything was ok from there.
leppie::AllocCPArticle("Zee blog"); Seen on my Campus BBS: Linux is free...coz no-one wants to pay for it.
|
|
|
|
|
tha's exactly the problem. Are you saying to add variables in the .cs file for the controls ? If so, I did that, it's not helping.
Christian
I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
|
|
|
|
|
|
There's a lot of it, but I'll try to post the essence of it.
I've got a Wizard class, which simply contains ascx files, each of which is a page in my wizard. It has a method called LoadControl which loads the wizard page into a placeholder on the page. This method takes a boolean flag, it is called in OnInit to load the control so that ViewState is restored, then called again in PageLoad, where it also sets up navigation buttons based on methods defined in the Interface that the wizard pages must impliment. I've looked at the HTML to ensure that the ID's are the same every time, and put in code to make sure that there are no automatically generated IDs anywhere. The current page ID is stored in viewstate, and the events that increment this are also working fine. It works really nicely, it loads the old page, then stores the values in the page into viewstate, then the event is fired and the new page is loaded, and any state restored. The problem comes with another control I've created, which is itself a composite of two controls we've written. My control binds these two controls to work as a particular view to browse our database, and a button that causes the view to flip between the two controls. This button is the event that is never fired in C#, although when I found an example in VB on the Visual Studio magazine site, it works fine. Porting it to C# also leaves me with events that don't fire. When Visual Studio finally wakes up from sorting out source control, I'll post some code.
The control gets loaded in my WizardControl like this:
override protected void LoadViewState(object savedState)
{
if (savedState != null)
{
base.LoadViewState(savedState);
LoadControl(false);
}
}
and then like this:
private void Page_Load(object sender, System.EventArgs e)
{
if (wizardControl.Controls.Count > 0)
{
IWizardPage wizardPage = wizardControl.Controls[0] as IWizardPage;
if (wizardPage != null)
{
pageData[wizardPage.PageName] = wizardPage.GetPageData();
Session[cPageData] = pageData;
}
}
LoadControl(true);
RestorePageData();
}
Christian
I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
|
|
|
|
|
It turns out that my buttons were being dynamically created at runtime by their host, in OnPreRender. Moved their creation to OnInit and now all is well. Thanks for looking.
Christian
I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
|
|
|
|
|
I developed a WEB Forms page using C#. One of the bottons in the page says: Select File. When clicking this, I need to show a File Dialog showing files of client machine, once selected the file the program will open it and read data line by line. For File Dialog, I need the "using System.Windows.Forms;" but as I am using WEB forms, program does not allow me to include ....Windows.Forms.
How can I solve this problem? Is there an special File Dialog in Web Forms??
best regards
|
|
|
|
|
You can't show FileDialog on client's computer with Asp.Net...
If you want user to choose file use html input with type set to file.
<input type="file" ..>
|
|
|
|
|
How can I convert a bitmap from one format to another. (For example, 256 colour to 24-bit colour)
|
|
|
|
|
How do we execute a command line command in a Windows Forms environment?
thanks
|
|
|
|