jeudi 18 février 2021

how to add icon to application's shortcut in mobile

I am having a problem with creating a url link (shortcut) in a non-system folder. The link is getting created properly on the desktop without any problem, I have working shortcut in desktop but not working in mobile browser after hosting.please help me what is the issue and resolve my problem.

public partial class CreateShortcut : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    private void urlShortcutToDesktop(string linkName, string linkUrl)
    {
    string deskDir = 
       Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory);
        using (StreamWriter writer = new StreamWriter(deskDir + "\\" + linkName + ".website"))
        {
            writer.WriteLine("[InternetShortcut]");
            writer.WriteLine("URL=" + linkUrl);
            writer.Flush();
        }
    }

   
    private void button1_Click(object sender, EventArgs e)
    {
        string linkName = "My Site";
        string linkUrl = "https://Asite.org";
        urlShortcutToDesktop(linkName, linkUrl);
    }

    private void appShortcutToDesktop(string linkName, string linkUrl)
    {
        string deskDir = Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory);
      
        using (StreamWriter writer = new StreamWriter(deskDir + "\\" + linkName + ".url"))
        {
            string app = System.Reflection.Assembly.GetExecutingAssembly().Location;
            writer.WriteLine("[InternetShortcut]");
            writer.WriteLine("URL=" + linkUrl);
            writer.Flush();
        }
    }
   

    protected void btnButton_Click(object sender, EventArgs e)
    {
        appShortcutToDesktop("Redipae", "http://redipae.in/");
      
    }

  
}



Aucun commentaire:

Enregistrer un commentaire