Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
V

Vimalsoft Pty Ltd

@Vimalsoft Pty Ltd
About
Posts
2.2k
Topics
438
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • The remote server returned an error: (403) Forbidden.
    V Vimalsoft Pty Ltd

    Good Day Everyone I have a response which i convert to byte array and download the pdf at the end. This code does download a PDF in localhost but gives an error {"Thread was being aborted."} and the file still get downloaded correctly. The code is defined as below

    string URL = "http://myserver/ReportServer/Pages/ReportViewer.aspx?%2Fbills%2FISU\_PDF\_GEN\_APT&rs:Command=Render";
    string Command = "Render";
    string Format = "PDF";
    //We can get values of these parameters from Request object.
    string Contract_account_number = AccountNumber;
    URL = URL + "&rs:Command=" + Command + "&rs:Format=" + Format + "&Contract_Account_Number=" + Contract_account_number;
    System.Net.HttpWebRequest Req = (System.Net.HttpWebRequest)System.Net.WebRequest.Create(URL);
    Req.Credentials = System.Net.CredentialCache.DefaultCredentials;
    Req.UseDefaultCredentials = true;
    Req.Method = "GET";
    System.Net.WebResponse objResponse = Req.GetResponse();
    System.IO.Stream stream = objResponse.GetResponseStream();
    var document = GenericMethods.StreamToByteArray(stream);
    Response.AddHeader("Content-type", "application/octet-stream");
    Response.AddHeader("Content-Disposition", "attachment; filename=" + AccountNumber + ".pdf");
    Response.BinaryWrite(document);
    Response.Flush();
    Response.End();

    when i host this in IIS i get an Error The remote server returned an error: (403) Forbidden. Thanks

    Vuyiswa Maseko, Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code. C#/VB.NET/ASP.NET/SQL7/2000/2005/2008 http://www.vimalsoft.com vuyiswa[at]vimalsoft.com

    ASP.NET csharp asp-net com sysadmin

  • Failed to load resource: the server responded with a status of 405 (Method Not Allowed)
    V Vimalsoft Pty Ltd

    I resolved it like this [Re: No 'Access-Control-Allow-Origin' header is present on the requested resource - JavaScript Discussion Boards](https://www.codeproject.com/Messages/4750863/Re-No-Access-Control-Allow-Origin-header-is-presen.aspx)

    Vuyiswa Maseko, Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code. C#/VB.NET/ASP.NET/SQL7/2000/2005/2008 http://www.vimalsoft.com vuyiswa[at]vimalsoft.com

    JavaScript csharp javascript json asp-net

  • Migrate to AndroidX
    V Vimalsoft Pty Ltd

    if you are using Visual studio its easy. but if you using other other IDE like AndroidStudio then you can look at this [Migrating to AndroidX  |  Android Developers](https://developer.android.com/jetpack/androidx/migrate)

    Vuyiswa Maseko, Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code. C#/VB.NET/ASP.NET/SQL7/2000/2005/2008 http://www.vimalsoft.com vuyiswa[at]vimalsoft.com

    Mobile android java mobile json tutorial

  • Need advice on which framework I should use for my app
    V Vimalsoft Pty Ltd

    You can use Xamarin.

    Vuyiswa Maseko, Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code. C#/VB.NET/ASP.NET/SQL7/2000/2005/2008 http://www.vimalsoft.com vuyiswa[at]vimalsoft.com

    Mobile python javascript json question

  • Xamarin Forms & WPF Question
    V Vimalsoft Pty Ltd

    hi Kevin Why do you want to mix Xamarin form and WPF if i may ask ? You can create a Xamarin Standard Project and create the content pages there and other types of pages or views you want to add , after that do your UI there and if there is a limitation on the Xamarin Forms you can use Custom Renders and this UI changes you have made in the standard form will be outputted to different platforms which is ios and Android. i know you have knowledge of WPF , you can use it on Xamarin Form. but leave WPF out of Mobile dev for now.

    Vuyiswa Maseko, Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code. C#/VB.NET/ASP.NET/SQL7/2000/2005/2008 http://www.vimalsoft.com vuyiswa[at]vimalsoft.com

    Mobile wpf mobile csharp android com

  • Globalization issues with Dates
    V Vimalsoft Pty Ltd

    Good Day Since the phone was changed to Chinese Traditional , i had to specify the system date to var finaldate = input.ToString("yyyy-MM-dd hh:mm:ss tt", CultureInfo.CreateSpecificCulture("en-US")); and this work for the input "2019/12/29 下午 09:14:3"

    Vuyiswa Maseko, Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code. C#/VB.NET/ASP.NET/SQL7/2000/2005/2008 http://www.vimalsoft.com vuyiswa[at]vimalsoft.com

    Android csharp asp-net database com

  • Globalization issues with Dates
    V Vimalsoft Pty Ltd

    Good Day Everyone i am doing an app and all is good. My app changes the language based on the device settings as they change. now i hit a wall when i saw dates in Traditional Chinese appeared like this 2019/12/29 下午 09:14:37 obviously when i try to search from the database i get the error that the date is not in the correct format. so since i will do this with different other languages , i want to create some universal or generic way to handle this dates. so i wrote this public static DateTime Convert_To_System_DateTime(string input) { return DateTime.ParseExact(input, "yy/MM/dd HH:mm:ss", CultureInfo.InvariantCulture); } and still i am not getting any joy. Thanks

    Vuyiswa Maseko, Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code. C#/VB.NET/ASP.NET/SQL7/2000/2005/2008 http://www.vimalsoft.com vuyiswa[at]vimalsoft.com

    Android csharp asp-net database com

  • After photo gallery browsing it goes back to the first page
    V Vimalsoft Pty Ltd

    Good Day in my Xamarin page i have a button that browse the gallery to allow a user to bind it to an image editor , after selecting the image , the page refreshes to the first page that led to this current page. i would like to make it keep it in the current page after image selection . below is the code on my button

    async private void Btnupload_Clicked(object sender, EventArgs e)
    {
    GenericMethods.IS_IMAGE_SELECTON = true;
    if (!CrossMedia.Current.IsPickPhotoSupported)
    {
    await DisplayAlert("Photos Not Supported", ":( Permission not granted to photos.", "OK");
    return;
    }
    var file = await CrossMedia.Current.PickPhotoAsync(new Plugin.Media.Abstractions.PickMediaOptions
    {
    PhotoSize = Plugin.Media.Abstractions.PhotoSize.Medium
    });

                if (file == null)
                    return;
    
                filePath = file.Path;
                paths.Enqueue(filePath);
    
                //Linux path 
                readytosave = GenericMethods.StreamToByteArray(file.GetStream());
    
                Uri uri = new Uri(file.Path);
                filename = string.Empty;
                if (uri.IsFile)
                {
                    filename = System.IO.Path.GetFileName(uri.LocalPath);
                }
                var extension = filename.Split('.')\[1\].ToLower();
    
                file\_extension = extension;
    
                 imageEditor.Source = ImageSource.FromStream(() =>
                {
                    var stream = file.GetStream();
                    return stream;
                });
            imagepopup.IsOpen = true;
        }
    

    Thanks

    Vuyiswa Maseko, Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code. C#/VB.NET/ASP.NET/SQL7/2000/2005/2008 http://www.vimalsoft.com vuyiswa[at]vimalsoft.com

    Mobile csharp asp-net mobile com

  • How to add emoji png's to an Entry control or Custom Entry Control
    V Vimalsoft Pty Ltd

    i see , i thought there is another way. let me stick to that. you answered my question

    Vuyiswa Maseko, Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code. C#/VB.NET/ASP.NET/SQL7/2000/2005/2008 http://www.vimalsoft.com vuyiswa[at]vimalsoft.com

    Mobile csharp asp-net com graphics

  • How to add emoji png's to an Entry control or Custom Entry Control
    V Vimalsoft Pty Ltd

    Good Day All The emoji's that are used on whatsup are Unicode characters judging from the high quality graphics that get displayed on the chat area and also on the text entry where a selected emoji is displayed before the message is sent. i would like to have a text entry that can allow me to put a png of emoji in an entry or custom entry control and also include text when text are there as depicted below [https://us.v-cdn.net/5019960/uploads/editor/pv/yacw7deyp8fw.png\](https://us.v-cdn.net/5019960/uploads/editor/pv/yacw7deyp8fw.png) how can i make this possible thanks

    Vuyiswa Maseko, Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code. C#/VB.NET/ASP.NET/SQL7/2000/2005/2008 http://www.vimalsoft.com vuyiswa[at]vimalsoft.com

    Mobile csharp asp-net com graphics

  • How to convert emoji's unicode strings
    V Vimalsoft Pty Ltd

    Good Day After i looked closely on the string , with lack of knowledge of the unicode stuff , i realized i just needed to replace the character and the emoji will be translated , the code below simply solved the problem

    txtresults.Text = txttext.Text.Replace("U+", "0x").ToLower();

    Vuyiswa Maseko, Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code. C#/VB.NET/ASP.NET/SQL7/2000/2005/2008 http://www.vimalsoft.com vuyiswa[at]vimalsoft.com

    C# csharp html asp-net com

  • How to convert emoji's unicode strings
    V Vimalsoft Pty Ltd

    Good Day All i have a unicode character which works very well /// Thinking face 🤔 /// UnicodeString Thinking =0x1f914; as you can see the value here is "0x1f914" so i use this site which has a list of emoji's [Full Emoji List, v12.0](http://www.unicode.org/emoji/charts/full-emoji-list.html) but the code in that website is "U+1F914" how do i convert U+1F914 to 0x1f914 in c# thanks

    Vuyiswa Maseko, Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code. C#/VB.NET/ASP.NET/SQL7/2000/2005/2008 http://www.vimalsoft.com vuyiswa[at]vimalsoft.com

    C# csharp html asp-net com

  • TapGestureRecognizer on an Image on Tab not work
    V Vimalsoft Pty Ltd

    Good Day All i have images in a Listview ,i tried this on a normal Listview and also Telerik , it behaves the same. The Tab event is not fired consistently sometimes when i tap the images they dont respond to the Tap. Here is my xaml

    Mobile wpf

  • Updating a ListView from a Service Every 5 seconds
    V Vimalsoft Pty Ltd

    Thanks for your valuable advice. I used SignalR and it worked for me.

    Mobile csharp asp-net android mobile

  • Updating a ListView from a Service Every 5 seconds
    V Vimalsoft Pty Ltd

    Good Day All i have a ListView that is defined in a Xamarin Form. i want this ListView to be updated with the Data from the DB every 5 seconds. In a Non Mobile environment , we have a Windows Service , which is a long running Service. but now i search i came across a Service. but now i see this is implemented differently on each platform. Most examples i get are examples where one is binding the Control in Android Project. WhatUp if my Data binding is done in Xamarin Form (Standard Class) . 1) Can i kindly have the example link or code that refresh any control from a Service that runs in Intervals 2) Update the control that is hosting in a PLC or Standard Class Thanks

    Vuyiswa Maseko, Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code. C#/VB.NET/ASP.NET/SQL7/2000/2005/2008 http://www.vimalsoft.com vuyiswa[at]vimalsoft.com

    Mobile csharp asp-net android mobile

  • How can I backup my sql server 2008 database on a remote server??
    V Vimalsoft Pty Ltd

    Which info do you need ?

    Vuyiswa Maseko, Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code. C#/VB.NET/ASP.NET/SQL7/2000/2005/2008 http://www.vimalsoft.com vuyiswa[at]vimalsoft.com

    Database database question sql-server sysadmin security

  • Show a ProgressDialog inside a Fragment that is injected in a Tab
    V Vimalsoft Pty Ltd

    You know this, even without a try/catch block? i stepped through and no exception was raised. Have you tried using getActivity() when constructing the ProgressDialog? let me try that and i will get back to you.

    Vuyiswa Maseko, Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code. C#/VB.NET/ASP.NET/SQL7/2000/2005/2008 http://www.vimalsoft.com vuyiswa[at]vimalsoft.com

    Android csharp asp-net com

  • Show a ProgressDialog inside a Fragment that is injected in a Tab
    V Vimalsoft Pty Ltd

    hi There is no Exception , the Context is the Application Context (Context.Android.Support.V4.App.Fragment.Context) , i also tried to declare the context at a fragment level and initialize it on OnCreateView (Android.Content.Context) but still it does not show the dialog. Please note this dialog shows nicely in an Activity not a Fragment. Thanks

    Vuyiswa Maseko, Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code. C#/VB.NET/ASP.NET/SQL7/2000/2005/2008 http://www.vimalsoft.com vuyiswa[at]vimalsoft.com

    Android csharp asp-net com

  • Show a ProgressDialog inside a Fragment that is injected in a Tab
    V Vimalsoft Pty Ltd

    The Dialog does not show

    Vuyiswa Maseko, Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code. C#/VB.NET/ASP.NET/SQL7/2000/2005/2008 http://www.vimalsoft.com vuyiswa[at]vimalsoft.com

    Android csharp asp-net com

  • Show a ProgressDialog inside a Fragment that is injected in a Tab
    V Vimalsoft Pty Ltd

    Good Day Everyone I have a Code that saves data and send an email after that. want to show Progress Dialog when this is happening. This code is in a Fragment that is shown in a Tab. below is my code in my Activity this works nicely. i have a challenge in making this to work in a Fragment

    btn_contact_save.Click += (sender, e) =>
    {
    var progressDialog = new ProgressDialog(Context);
    progressDialog.SetTitle("Saving...");
    progressDialog.Indeterminate = true;
    progressDialog.Show();
    progressDialog.SetCancelable(false);

                 btn\_details\_save\_Click(view);
    
                progressDialog.Dismiss();
    
            };
    

    Thanks

    Vuyiswa Maseko, Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code. C#/VB.NET/ASP.NET/SQL7/2000/2005/2008 http://www.vimalsoft.com vuyiswa[at]vimalsoft.com

    Android csharp asp-net com
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups