Desktop Application run from web application on server And Also Pass Argument

 →  First Publish your Desktop application on server
  
→  So Now you can run your desktop application online.
 → And After Publish Desktop application you can runt that application from your browser.


   PASSING PARAMTER TO PUBLISH DESKTOP APPLICATION FROM WEB APPLICATION



 →  First Publish your Dektop application so your publish folder contain  APPLICATIONNAME.application


 →  after that open your VS 2005 Command Propmt.

→  Run the Command mageui


 →  So Window open which shown Below screen short.




 → Now open APPLICATIONNAME.application   File from open Window  The Application File Which Resides On Server


 →  Now From Left Pannel Go on Deployment Open And Check on Allow Url Parameter ,  Screen Short Shown Below.


 →  Now in Desktop Application in Which you Need Query String paramter Just Write Down Below Code On Load.






private string GetQueryStringParameters()
    {
        NameValueCollection nameValueTable = new NameValueCollection();
        if (ApplicationDeployment.IsNetworkDeployed)
        {
            string queryString = ApplicationDeployment.CurrentDeployment.ActivationUri.Query;
            string[] arInfo = new string[4];
            char[] splitter = { '=' };
            arInfo = queryString.Split(splitter);
            return arInfo[1].ToString();
        }

        else
        {
            return "";
        }
    }

→ I need only One Argument So I Do this You Can Get collection of Argument

                                if you have any question and suggestion Then write Down in commentBox.



Prev Post                                                      All Post                                                           Next Post



Posted in | 0 comments

CrystalReport 10.0 Dynamic Image Display Problem

CrystalReport 10.0 Dynamic Image Display Problem




To Display Dynamic Image in Crystal Report 10.0 Do The Following

Add BytesArray Column in DataTable For Image.

Then Just Convert your Image to Bytes Array.

Now just Drag and Drop that Bytes Array.

Now your Solution Work But there are many user getting that image can not diaply in Crystal Report 10.0
For that Just Add Folowing Code in Web.Config



< /system.web >
< httpHandlers > < add verb="GET" path="CrystalImageHandler.aspx" type="CrystalDecisions.Web.CrystalImageHandler, CrystalDecisions.Web, Version=10.2.3600.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/ > < /httpHandlers >
< /system.web >


Enjoy .......


Prev Post                                                      All Post                                                           Next Post

Posted in | 1 comments

Sending Email Using ASP.Net 2.0

Sending Email Using ASP.Net 2.0
Add Belowe Name Space to Access All Class and Methods Which Are Needed for Sending Mail.
using System.Net.Mail;
Write Down Following Code on Button Click
MailMessage msg = new MailMessage();
msg.From = new MailAddress("youaddress@yourdomain.com");
msg.To.Add(new MailAddress("sent@domain.com"));
msg.Subject = "Message Subject";
msg.Body = "Mail body content";
msg.IsBodyHtml = true;
msg.Priority = MailPriority.High;
SmtpClient c = new SmtpClient("domain smtp server");
c.Credentials = new System.Net.NetworkCredential("user@domain.com", "userpassword");
c.Send(msg);
While Developing and Testing this Module there are Verious Problem Exisits it's mainly Security and SMTP Configuration
Related if you Found any Problem then let me know that Once.


Prev Post                                                      All Post                                                           Next Post


Posted in | 3 comments

Merge Cell in GridView Header ASP.Net 2.0

Merge Cell in GridView Header ASP.Net 2.0

Here i am going to see one of the best method to do that. To have additional header, we need to add one GridViewRow of header type to GridView inside OnRowCreated event method. The code snippet for doing this,
protected void GridView_Merge_Header_RowCreated(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.Header)
{
//Build custom header.
GridView oGridView = (GridView)sender;
GridViewRow oGridViewRow = new GridViewRow(0, 0, DataControlRowType.Header, DataControlRowState.Insert);
TableCell oTableCell = new TableCell();
//Add Department
oTableCell.Text = "Writen Test Result";
oTableCell.ColumnSpan = 4;
oGridViewRow.Cells.Add(oTableCell);
//Add Employee
oTableCell = new TableCell();
oTableCell.Text = "Verbalk Test Result";
oTableCell.ColumnSpan = 4;
oGridViewRow.Cells.Add(oTableCell);
oGridView.Controls[0].Controls.AddAt(0, oGridViewRow);
}
}


Prev Post                                                      All Post                                                           Next Post



Posted in | 1 comments

Highlighting the current menu item From Collection of menu In Asp.Net 2.0 Menu Control

Highlighting the current menu item From Collection of menu Items In Asp.net 2.0 Menu control

In Asp.Net 2.0 Menu There Are Often Required to Highlight Current Selected Menu Item. There are various Way to Do it.One Method For Doing This One Describe Below.
string ThisPage = Page.AppRelativeVirtualPath;
foreach (MenuItem ParentMenu in Menu2.Items)
{
if (ParentMenu.NavigateUrl == ThisPage)
{
ParentMenu.Selected = true;
}
else
{
foreach (MenuItem childMenu in ParentMenu.ChildItems)
{
if (childMenu.NavigateUrl == ThisPage)
{
childMenu.Selected = true;
}
}
}
}

Prev Post                                                      All Post                                                           Next Post

Posted in | 1 comments