C# - How To Execute WebPage (Variable Change)
Oct 19, 2011I need execute a webPage for example [URL]. Well those variables change then I need execute this webpage but, I don't want it opens on c# or vb.net.
View 2 RepliesI need execute a webPage for example [URL]. Well those variables change then I need execute this webpage but, I don't want it opens on c# or vb.net.
View 2 RepliesWhat I am trying to do is go to a website using a webbrowser, and then simulate a click. I can do this easy enough when the click is on a regular button, not handling javascript. But it seems that the website has a javascript function handling the click that I want to simulate[code]...
View 1 RepliesI was wondering if there is anyway you could go about executing what's stored in a variable....kinda like in an #Eval statement....
E.g.
dim i as integer
dim PlaceHolder as String
for i = 1 to 10
[Code].....
I want to make a query like this.[url]...
When I test it on my mysql query browser, it works well.
Now, I want to execute it in VB with mysqlCommand. of course @rownum is defined as a parameter and waiting for its value. How can I execute that query in VB?
Is there a way to "execute" a string variable as a command? [code]
View 9 RepliesI have the following function
Public Function GetPositionBySchoolID(ByVal SchoolID As Integer) As CPAPositionsDataTable
Dim positions As New CPAPositionsDataTable
[Code]....
And I was wondering if there is any way to cut out assigning the LINQ result to tmp and just work with the result directly, i.e.
Public Function GetPositionBySchoolID(ByVal SchoolID As Integer) As CPAPositionsDataTable
Dim positions As New CPAPositionsDataTable
[Code].....
What i am tring to do is execute certain code based on a variable held in a module someting like compiler directives, here's an example for lack of an explanation.[code]...
View 2 RepliesI'm using some VB.Net code to manipulate files on my system - the idea is that the code checks if a file exists, and based on a value read from a text file elsewhere the system decides what to do... For this I'm using a 'select... case' statement to decide on the action to take. However, when assigning a value to the variable, the code doesn't even find the option to go for... Here's the VB code:
[Code]...
excuse my stupidness, i'm fairly new to VB and i've only done a little bit with it before. Basically i am making a little application that i want to run on my machine. Standalone not via a web browser.I have a web page which is generated using php, there is no html code on the page simply a number, e.g. "9995" when you view source.
All i want to do is return this value from the web page (without actually opening the page in a browser) and display it in a text box in VB or store it as a variable that i can use later. point me in the correct direction or right keywords to research, or if you have a simple example that would be even better
I decided it's time to migrate from VB6 to VB.NET and am currently translating my radio player but have run into several issues so I might be on this forum for the rest of the day... Anyway, in VB6 I used Inet to get the source of a PHP page that had the current song that was playing on the SHOUTcast stream. I can't seem to get Inet to work and figured I would just look for another method so I wouldn't need to pack msinet.ocx along with the finished product.
How can I get the source of the PHP page and store it in a variable or textbox/label.
I have a form that has a webbrowser and two buttons in it. [code] This all works great but when the last line is run in Button 2 [code] another page is displayed before the data I am trying to get is available. There are more fields and another button to be pressed. However, because another page is loaded, I don't think I can just plop in the lines of code I need to manipulate the website because of load delays. Should I use VB's timer to delay a few seconds before running the next sequence of code?
View 6 RepliesThe code below works for the class that I hard coded "XCCustomers" in my RetrieveIDandName method where I use CType. However, I would like to be able to pass in various classes and property names to get the integer and string LIST returned. For example, in my code below, I would like to also pass in "XCEmployees" to my RetrieveIDandName method. I feel so close... I was hoping someone knew how to use CType where I can pass in the class name as a string variable.
Note, all the other examples I have seen and tried fail because we are using Option Strict On which disallows late binding. That is why I need to use CType.I also studied the "Activator.CreateInstance" code examples to try to get the class reference instance by string name but I was unable to get CType to work with that.When I use obj.GetType.Name or obj.GetType.FullName in place of the "XCCustomers" in CType(obj, XCCustomers)(i)I get the error "Type 'obj.GetType.Name' is not defined" or "Type 'obj.GetType.FullName' is not defined"
'+++++++++++++++++++++++++++++++
Imports DataLaasXC.Business
Imports DataLaasXC.Utilities
[code]....
How can i get or change the selecteditem in from a webpage combobox in a webbrowser control?
View 2 RepliesI have a web browser with tabs, and I wanted to know the following:
1. When yougo to a webpage the Tab name will be the websites title, if the title is over
2 5 characters, then it ends with a "..."
2. how do I make the adress bar URL change when switching tabs?
How do declare a public variable .aspx web page that can be used in all the pages within my web application?
View 3 Repliesi have an aspx page with vb.net back end. in that page i get names and url's from the database depending on different conditions. My requirement is that when i get the url, the code should then use that url and have that webpage in a small preview form on my existing aspx page. so basically i have a table as follows -
[Code]...
I have a variable declared in the 'Form1' class and I want to change it in a sub in different class to a different value, and then use it agin in the 'Form1' class. However, I don't seem to be able to change the value in a different class. Is there any way I can rectify this?
View 3 RepliesI have a variable whose scope needs to be global, because it needs to be called in a function as well as in a button press. So I declared the variable in a Module so it would be global.The problem is that the value of this variable needs to be equal to the value of the text property of a textbox in the form.You enter a string into the textbox, in this case I entered "Hello". Then you click the button and it displays what you wrote.You click OK in that message box and change the value in the textbox. In this case I changed it to "Goodbye". Then I hit the button again, but the variable did not change values and the messagebox displays "Hello" again.
[code]....
Here is the entire source code:
Module Module1
Public strDataValue = frmTest.txtDataValue.Text
End Module
[code]....
Note: This is just a demonstration of a problem I'm having in a much larger program so the variable does have to be global.
Say I have a variable. Say I want to know when does the function change.'On vs2008 I think on the watch I can edit watch and put something about it. What can I do about it now? There is no such option in the context menu if I click on a watch variable
View 4 RepliesIn some part of my code i need to redefine the type of variable that was defined with a different type at the beginning
dim T as new MyClass
...
redefine T as ( MyClass2)
i do not want to do something like
dim T
t= new MyClass
.....
t= new MyClass 2
Looking for the best way to update a variable in a different class. Below is a rough outline of the situation.
I am wondering if in fnSendEmailTo if I can access the Property in CB?[code]...
I can't figure out how to make it so that when a variable reaches a certain value, an event is triggered. For example if I wanted a user's level to change to 2 when he gets 1000 exp.
Dim level as integer
Dim exp as integer
*****What do I put here?*****(when exp reaches 1000)
level = 2
how to change datetime variable in sql? I nee only time without date in textbox?
There's code:
Dim
connetionString As String
[code].....
Need to change datetime with time variable in this code, i tried bu it gets error
Public Sub SetWakeUpTime(ByVal time As DateTime)
bgWorker.RunWorkerAsync(time.ToFileTime())
End Sub
[Code].....
I was wondering if it was possible to change the default variable name that shows up in the auto-complete for a Try-Catch block. It populates as:
Try
Catch ex As Exception
End Try
I want it so it populates as:
Try
Catch excError As Exception
End Try
i change the value of the variable in the Backgroundworker but the if i use the varible valur outside of the thred the varible value doesn't change still previous.
View 2 Repliesis there a way i can do like this in vb.net
[Code]...
what i want is that idx keeps incrementing after each line, without incrementing it on a seperate line.
I'm trying to make an application to do mathematical equations, but I also want to implement error checking. So that if someone doesn't put anything in one of the fields the output textbox will say "Error".
But the problem is that I already declared the variables I used as a numeric value, in my case decimal.
So, when I make an if statement that says if inputbox1="" then outputbox1="Error" it doesn't work.
I think that in order to get this to work I would have to have it setup so that the variable that is exported to the text property of outputbox1 could switch between being declared as a decimal or string value based on what the user put into the textboxes. But I'm not sure how to go about this. Declaring the variables inside the if/elseif statements won't work because the variables need to be declared before they are calculated within my if/elseif statements.
I'm multiplying X*Y*Z in a loop of 200 interations Y is declared as a constant. A timer can cause the loop to pause for 10 seconds.
During this 10 sexond pause I would like to change the value of Y. It needs to be changed only for this run, not a permanent change which can be done in the declaration.
Running windows forms application, I have a module with public variable declarations which stay in scope during entire debug execution.Is there a way to cause a break to happen based on a change in value of such a variable?
View 1 Replies