How to add multiple web links on a button in c#? - c#

How to add multiple web links behind a single button in C#, so that web link always change whenever I click on the button and browser open next link on every click on the button?

Related

HttpClient, how to click button on website in tests

I have page where i have button which makes ajax-request to server and load simple modal form. I have one input and one button in form.
How i can test it on C# ?
I need just navigate to link -> click -> load form. Then just input text and click button.
I dont want use selenium for it.
Thx, it really only selenium. So i just need to use it.

How to open a link, fill data then click a button with no browser?

What I need is to open a web page with a link fill some textbox with my data, click in any button and then read the data of the page in C#.
For example :
Open (www.google.es) then fill the search box with "stackOverFlow", click on the search button and then read the results.
I've been looking and I think I can read the data with HttpClient but I have no clue about how to proceed with the other part.
Edit: Actually using a .net Framework console aplicattion but I can change this to an MVC app or a Winform app
You should be able to type input by calling script:
document.getElementById("Input").value = "My value";
and then post it by calling script from question below or simulate button clink (if you are not sure that button do post)
JavaScript post request like a form submit
Simulating Button click in javascript
If you are trying to create a custom search and show result in your own application, you will need to find the implementation of rest API of that search provider. To get started, luckily google provides that.
follow the link to get started:
https://developers.google.com/custom-search/v1/overview

Is it possible to change web form url name dynamically upon button click?

I am trying to see if the function even exists. I'm sure everything is possible. Here is the scenario:
I have a web based application that displays a form. After all the parameters are filled in, and the "submit" button is clicked. I would like that completed page to stay intact, but have the url change so that an employee (from another terminal) can check (by clicking a link on a "queue" page) and approve the form prior to final processing.
Is this possibly... and any ideas on how to do it in C#?
FYI... the final process is that the form (currently) imports each filled in value/signature into a PDF template and stores it as a completed PDF.

How to complete some task on click of a button and then navigate to a different page?

I am developing a winform app which is controlling a website. On click of a button in winform app i want to fill a form, click the submit button on the web page upon which a new page will open , on that page i have to click on a link.
How to achieve this. i have tried many things but did not got any proper solution
If you're looking for a web automation tool, use Watin. It allows you to automate via code the opening of a browser, the clicking of buttons, and the fillout of form fields. However, that is more of a testing library.
Honestly though, your choice of solution sounds odd. You're trying to get a client application to make requests through a web page, instead of directly requesting whatever resource yourself from the client application. It's hard to give you a direct solution without a good understanding of the problem space.

Is there TAB control and how to open page2 from button click?

Is there TAB control and how to open page2 from button click ?
On asp.net ?
I work with C# and Visual Studio 2008 and ASP.NET
Thanks in advance
The standard ASP.NET controls that ship with the .NET Framework do not include a tab control. However you can find a number of implementations on the internet, I would suggest you look the jQuery UI.
As for the button click redirecting to page2 you can handle the button click event on the server side and use a Response.Redirect("page2.aspx") to redirect the users browser to the desired page. Other alternatives exist like using an anchor (link) which will request the second page directly.
Set the SelectedTab property to the index of the tab you want to display in the click event of your button.

Categories