VB 6.0 - HTTP Posting with VB Code, (or best solution)
Asked By TK Neva
28-Jan-10 05:06 PM
I am trying to post an XML file to a secure HTTP website, but I don't know where to start. Does anyone have any ideas on the coding for this in VB. I would probably want to run the script on a schedule on my server so that it will look for any files in a certain directory, post them, then move them to an archive when posted to the site.
If anyone has any ideas/suggestions, I appreciate it. Any other suggestions on how to do this would also be great.
Thanks!
Get the latest COM xml parser (msxml4 or maybe msxml5)
webBrowser1 button.InvokeMember("click");
Hi TK Neva,
private void Form1_Load(object sender, EventArgs e)
{
webBrowser1.Navigate("site name");
while (webBrowser1.ReadyState!=WebBrowserReadyState.Complete)
{
Application.DoEvents(); //Bu kod ile programın kitlemesini önlüyor.
}
HtmlElement user = webBrowser1.Document.GetElementById("User name ID");
user.SetAttribute("value","inputa girilecek değer");
HtmlElement pass = webBrowser1.Document.GetElementById("Pwd ID");
pass.SetAttribute("value","inputa girilecek değer");
HtmlElement button = webBrowser1.Document.GetElementById("submit butonunun ID");
button.InvokeMember("click");
}
I think you want to say abow,
Good Works..

how to pass a control from java script to resource .VB File Here is my java script function - -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- - function RadBtnCreFol_ClientClicked(sender, eventArgs) { var Text = document.getElementById( "ctl00_ContentPlaceHolder1_RadTxtCreFol" ).value var MyTree = $find( 'ctl00_ContentPlaceHolder1_mytree' ); SuperFastWS.CreateFolder(Text, MyTree); } - -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- - resource VB File - -- -- -- -- -- -- -- -- -- -- -- -- -- -- - Public Function CreateFolder( ByVal stringFolder As String , ByVal mytree As Telerik.Web.UI. RadTreeView id = "controlId"> <input type = "submit" / > < / form> <script language = "javascript"> function validate(controlId) { var control = document.getElementById('controlId'); var iChars = "!@#$%^&*()+ = -[] \ \ ';, . / {} | \ ":<> ?"; for (var i = 0; i < control.value.length ; i++) { if (iChars.indexOf php?t = 639716 I want to pass a control form java script to resource file(.VB Class file) you will include a JavaScript file as an embedded resource in an assembly form called hidTest then use the following javascript <% hidTest.value = jj("iii") %> var st = document.getElementById('<% = hidTest.clientId %> ').value; document.write(st); Create New Account
type is not defined in vb.net Hi, This code is working in ASP.Net. I want vb.net Dim openFileDialog As New Windows.Forms.OpenFileDialog() Its not working in vb.net the error is type is not defined. Thank you. Hi, No solutions that site I tries this and its working fine in vb windows app. . . Dim openFileDialog As New Windows.Forms.OpenFileDialog() openFileDialog.ShowDialog() I suppose you are file usage. you need to place COMDLG32.CAB cab file in your webside, you document.getElementById('comobDlg').showopen(); Hi It's work fine in vb.net Sample how to use this dialog. Private Sub button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Dim myStream As Stream = Nothing Dim openFileDialog1 As New OpenFileDialog() openFileDialog1.InitialDirectory = "c: \ " openFileDialog1.Filter
Calling Javascript functions in VB.net code This is the javascript function and I'm calling this method in my vb.net code. The jsfunction printPageZB works fine but function printPage() prints only 1 page, i What am i doing wrong here. . . . .any suggestions? function printPageZB() { window.print(); } function printPage() { document.getElementById( 'pnlPhotoBook' ).style.display = 'none' ; window.print(); document.getElementById( 'pnlPhotoBook' ).style.display = 'block' ; window.print(); } vb.net code Protected Sub Button1_Click( ByVal sender As Object , ByVal e As System.EventArgs) Handles Button1.Click Dim jsr As String = "<script type = 'text / javascript'> printPage();< / script> " Dim jsr2 working"); / / add this alert box to make sure that your javascript has been called. document.getElementById( '<% = pnlPhotoBook.ClientID %> ' ).style.display = 'none' ; window.print(); document.getElementById( ' <% = pnlPhotoBook .ClientID %> ' ).style.display = 'block' ; window.print(); } Regards, Vasanth hi Windows.print function only one
done a calculation by using javascript. code: function calc(obj1, obj2, obj3 ) { var txt1 = document.getElementById(obj1.id).value; var txt2 = document.getElementById(obj2.id).value; var txt3 = document.getElementById(obj3.id); txt3.value = parseInt(txt1)+parseInt(txt2); } It's working fine. . but When i the hiddenfield to the textbox3. See this. function calc(obj1, obj2, obj3 ) { var txt1 = document.getElementById(obj1.id).value; var txt2 = document.getElementById(obj2.id).value; var txt3 = document.getElementById(obj3.id); Hidden1.value = parseInt(txt1)+parseInt(txt2); } And on Page_Load txt3.Text = Hidden.ToString the hidden variable to / / the value of the javascript variable var hiddenControl = ‘<% = inpHide.ClientID %> ’ ; document.getElementById(hiddenControl).value = jsVar; } < / script > < / head > < body onload = ”SetHiddenVariable()”> < form id = ”form1″ runat = ”server”> < div > < input code behind on a Button click as shown below: C# protected void btnJSValue_Click( object sender, EventArgs e) { txtJSValue.Text = inpHide.Value; } VB.NET Protected Sub btnJSValue_Click( ByVal sender As Object , ByVal
vb.net file upload control I want to create a fileupload control to a column in gridview dynamically in vb.net Hope this helps Design Imports System.Data.SqlClient Partial Class GridUploads Inherits System.Web UI.Page Protected Sub Page_Load(ByVal s As Object, ByVal e As System.EventArgs) Handles Me.Load If CheckIFrameMode() Then Return If Not IsPostBack Then BindStudentsGrid() End Sub Protected False End If End Function Protected Sub btnUpload_Click(ByVal o As Object, ByVal e As EventArgs) _ Handles btnUpload.Click Dim studentId As Integer = CInt(ViewState("StudentID")) Try If upFile.HasFile parent.StartFilesUpload();" ClientScript.RegisterStartupScript(Me.GetType(), "", s, True) End Sub End Class Design <%@ Page Language = "VB" AutoEventWireup = "false" CodeFile = "GridUploads.aspx.vb" Inherits = "GridUploads" %> <html> <head> <title> Untitled Page< / title> <style type = "text / css"> body, td, th location.href = = "about:blank") continue; / / skip iframes that have already been processed if (!frm.document.getElementById("pnlUploadControl")) continue; / / skip iframes that have no file selected if (frm.document.getElementById("upFile").value = = "") continue; / / get StudentID to which iframe is linked to studentId = frm.name.replace