Thanks for your help. Since am a new to infoapth development, I could not able to find the relavent info. could you please help me how to map network/any client path upon clicking the button. I tried with the following approach but helpless., Please have a look on my code and if possibel try to share your approach.
//below code is working but it is pointing to "Server file path" rather pointing to "local" path.... I dont know how to refer the local path uisng infoapth managed code.
using
(ClientContext ctx = new ClientContext("http://myteam123/sites/abc/"))
{
Web currentWeb = ctx.Web;
ctx.Load(currentWeb);
ctx.ExecuteQuery();
string Path = this.MainDataSource.CreateNavigator().SelectSingleNode("/my:myFields/my:field4", NamespaceManager).Value;
using (FileStream fs = new FileStream(path, FileMode.Open))
{
byte[] byteArray= StreamFile("test",fs);
UploadDocument1(
"http://myteam123/sites/abc/", "Shared Documents", "Shared Documents/", "test1", byteArray); // upload to shared doc.
}
}