Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <pre><code>&lt;%@ Import Namespace = "System.Data" %&gt; &lt;%@ Import Namespace = "System.Data.SqlClient" %&gt; &lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /&gt; &lt;link href="../css/fileuploader.css" rel="stylesheet" type="text/css"&gt; &lt;style&gt; body {font-size:10px; font-family:arial, sans-serif; width:700px; margin:100px auto;} td{ font-family:Verdana; font-size:1; } &lt;/style&gt; &lt;/head&gt; &lt;body onload="document.getElementById('myapp').focus()"&gt; &lt;script src="../js/fileuploader.js" type="text/javascript"&gt;&lt;/script&gt; &lt;script&gt; function createUploader(){ var uploader = new qq.FileUploader({ element: document.getElementById('fupld'), action: 'fup.aspx', params: { 'phones': document.getElementById('hdn').value, 'appname':document.getElementById('myapp').value } , debug: true }); } // in your app create uploader as soon as the DOM is ready // don't wait for the window to load //window.onload = createUploader; &lt;/script&gt; &lt;b&gt;Enter Application Name&lt;/b&gt; : &lt;input type="text" id="myapp" onBlur="document.getElementById('phonediv').style.display='block'"&gt; &lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt; &lt;div id="phonediv" style="border:1px solid;border-radius:5px;-moz-border-radius:5px;"&gt; &lt;% Dim builder As New StringBuilder Dim RetRes As String Dim con As New SqlConnection Dim cmd As New SqlCommand Try con.ConnectionString = ConfigurationManager.ConnectionStrings("sqlsds").ConnectionString con.Open() cmd.Connection = con cmd.CommandText = "select distinct user_friendly_device_model,browser_returned_device_model from dbo.DeviceServiceMap" Dim lrd As SqlDataReader = cmd.ExecuteReader() Dim i As Integer %&gt; &lt;table border="0"&gt; &lt;tr&gt; &lt;% While lrd.Read() i = i + 1 %&gt; &lt;td&gt;&lt;%Response.Write(lrd.getValue(0))%&gt; &lt;/td&gt;&lt;td&gt;&lt;input type=checkbox name='cb' value='&lt;%Response.Write(lrd.getValue(1))%&gt;' style='vertical-align:middle'&gt; &lt;/td&gt; &lt;% if i=4 %&gt; &lt;/tr&gt;&lt;tr&gt; &lt;% i = 0 End If End While %&gt; &lt;/tr&gt;&lt;/table&gt; &lt;% Catch ex As Exception Finally con.Close() End Try %&gt; &lt;br/&gt; &lt;input type="Button" value="Next ..." onClick="a()" /&gt; &lt;/div&gt; &lt;input type="hidden" name="h" id="hdn"&gt; &lt;/br&gt; &lt;div id="fupld"&gt; &lt;/div&gt; &lt;/body&gt; &lt;script language="javascript"&gt; function a() { if(document.getElementById('myapp').value.length==0) { alert("Enter Application Name Please") document.getElementById('myapp').focus() return false } var checkboxes = document.getElementsByName('cb'); var checkboxesChecked="" ; // loop over them all for (var i=0; i&lt;checkboxes.length; i++) { // And stick the checked ones onto an array... if (checkboxes[i].checked) { checkboxesChecked+=checkboxes[i].value+","; } } if(checkboxesChecked.length==0) { alert("Select At least one Model ...") checkboxes[0].focus() return false } document.getElementById('hdn').value= checkboxesChecked.substring(0,checkboxesChecked.length - 1) var letterNumber = /^[0-9a-zA-Z]+$/; if(document.getElementById('myapp').value.match(letterNumber)) { createUploader() return true; } else { alert("Enter only numbers and letters"); document.getElementById('myapp').value="" document.getElementById('myapp').focus() return false } // document.getElementById('fupld').style.display='block' } &lt;/script&gt; &lt;/html&gt; </code></pre> <p>fup.aspx </p> <pre><code>&lt;% Dim apnm As String Dim phonelst As String apnm = Request.QueryString("appname") phonelst = Request.QueryString("phones") Dim fileName As String = context.Request.Headers("X-File-Name") Dim length As Integer = context.Request.ContentLength Dim documentBytes = New Byte(length - 1) {} context.Request.InputStream.Read(documentBytes, 0, length) Dim oFileStream As System.IO.FileStream oFileStream = New System.IO.FileStream(Server.MapPath("./apps/"&amp; fileName), System.IO.FileMode.Create) oFileStream.Write(documentBytes, 0, documentBytes.Length) oFileStream.Close() Dim pnm() As String pnm=phonelst.split(",") Dim i As Integer for i= 0 to pnm.length - 1 Dim connection As SqlConnection Dim cmd As SqlCommand Dim connectionString As String connectionString = ConfigurationManager.ConnectionStrings("sqlsds").ConnectionString connection = New SqlConnection(connectionString) cmd = New SqlCommand("dbo.spUpdatePhoneData", connection) cmd.CommandType = CommandType.StoredProcedure cmd.Parameters.AddWithValue("@p_model",pnm(i)) cmd.Parameters.AddWithValue("@p_apkname",apnm) cmd.Parameters.AddWithValue("@p_apkfile",fileName) Try connection.Open() cmd.ExecuteNonQuery() Catch ex As Exception Response.Write(ex.Message) Finally connection.Close() End Try Next i Response.Write("{success: true}") %&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload