how to change the default form name (Form1) when saving?

F

Francesco

Anybody can give me some indications about the code I need in order to have
the default "Form1" changed into another text (for instance NameSurname) when
saving the Form?

I have the following code for the OnSaveRequest, but how can I get the form
default name?

function XDocument::OnSaveRequest(eventObj)
{
// Write the code to be run before saving here.
eventObj.IsCancelled = eventObj.PerformSaveOperation();

// Write the code to be run after saving here.
eventObj.ReturnStatus = true;
}

Thanks in advanced.
Francesco
 
G

Gaurav Bhardwaj

Hi,

You can save the form with the following code:-
XDocument..SaveAs(Path); //but the form shoud be full trusted

You can get the default form name by :-
XDocument.URI;

Is this what you are trying to ask ?

Thanks,
Gaurav
 
F

Francesco

thanks for the reply.
So my question is : how can I overwrite the default XDocument.URI with
another text like "2006-02-15" ?
 
F

Francesco

I am trying to chang the name with some code like
XDocument.SaveAs("C:\MyForm.xml");
but I get an error

Is it correct what I am doing?
 
F

Francesco

ok, probably this error is due to the security level of the form...
I' ll try to install the form with Windows installer
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top