How to change the text

Posted by Srikrishna777 under C# on 10/15/2009 | Views : 1153 | Status : [Member] | Replies : 1
Hi ,

I am exporting some custom Layout information into different formats like pdf,excel,txt etc from the grid.
When I am exporting the system it is asking ,with what name the file has to be stored and the path.
And if I provide them, it is getting save successfully .But,After saving the document it is asking the user to open the document or not.
as FileC:\Users\Srikrishna.Murthy\Desktop\Default.jpeg.Do you want to open it?...Now I want to customize this text.I am not handling this message.Upon saving the document,it pops up the user to open or not.
Now How Can I customize this message.Should I Override any events?

This following is the piece of code.
private void ExportTo(string filename, CustomLayoutData layoutData)
{
try
{
Cursor currentCursor = Cursor.Current;
Cursor.Current = Cursors.WaitCursor;

this.FindForm().Refresh();
XmlSerializerFactory factory = new XmlSerializerFactory();
string xmlString = string.Empty;
using (TextWriter twriter = new StringWriter())
{
XmlSerializer xs = factory.CreateSerializer(typeof(CustomLayoutData));
xs.Serialize(twriter, layoutData);
xmlString = twriter.ToString();
}

XmlDocument xmlDoc = new XmlDocument();
xmlDoc.LoadXml(xmlString);
xmlDoc.Save(filename);

Cursor.Current = currentCursor;
}
catch (Exception ex)
{
throw ex;
}
}

Thanks In advance,
Srikrishna




Responses

Posted by: Virendradugar on: 10/15/2009 [Member] [MVP] Silver

Up
0
Down
Hi,

It's behaviour of the browser and I guess it can not be changed.

Thanks,
Virendra Dugar

Srikrishna777, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response