Ankush

Ankush

  • NA
  • 267
  • 60.6k

Save Local Html Page code to sqlite database

Dec 12 2020 1:42 AM
I have created a windows application. I have some html files created locally, I am able to read the entire file in textbox, but not able to save the html code in database
 
For eg:- below is the html code I want to save in sqlite database. I tried to save using string array also but no success..
 
Thanks in Advance. .....!!!
  1. <!DOCTYPE html>  
  2. <html>  
  3. <head>  
  4.     <title>Generic Functions</title>  
  5.     <meta charset="UTF-8">  
  6.     <meta name="viewport" content="width=device-width, initial-scale=1">  
  7.     <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>  
  8.     <script>  
  9.         $(document).ready(function() {  
  10.             $('#btn1').click(function() {  
  11.                 // alert("Button 1 clicked.");  
  12.                 if (ObjectExists("mytxt1")) {  
  13.                     console.log("inside if con");  
  14.                     alert("Textbox exists");  
  15.                     $("#mytxt1").val("NA");  
  16.                     alert("Button 1 clicked.");  
  17.                 }  
  18.             });  
  19.             $('#btn2').click(function() {  
  20.                 alert("Button 2 clicked.");  
  21.             });  
  22.             $('#btn3').click(function() {  
  23.                 alert("Button 3 clicked.");  
  24.             });  
  25.         });  
  26.         //document.getElementById("btn2").focus();  
  27.     </script>  
  28. </head>  
  29. <body>  
  30.     <h2>General Page</h2>  
  31.     <div>  
  32.         <button id="btn1">Button 1</button>  
  33.         <button id="btn2">Button 2</button>  
  34.         <button id="btn3">Button 3</button>  
  35.     </div>  
  36.     <div id="site">  
  37.         <input type="text" id="mytxt1">  
  38.         <input type="text" id="mytxt2">  
  39.         <input type="text" id="mytxt2">  
  40.         <input type="text" id="mytxt4">  
  41.     </div>  
  42.     <div id="number">  
  43.         <input type="radio" id="rb1">Yes  
  44.         <input type="radio" id="rb2">No  
  45.         <input type="radio" id="rb3">Not Sure  
  46.         <input type="radio" id="rb4">Good  
  47.     </div>  
  48. </body>  
  49. </html>  

Answers (10)