I'm working on a project in c# .net where I have a website, on the page is a textbox
I have some qr codes that link to this page
when a particular qr code must fill in a text box.
it is possible to write a ULR that can automatically fill in the textbox
ex page.com(insert to tbxOne:"123")
How are you getting the QR codes?
Without code I can't be too much help but you could try come if the following things.
Document.getelementbyid(#id).innerhtml("text");
This will allow you to set the text of an element on the webpage.
https://msdn.microsoft.com/en-us/library/system.windows.forms.htmldocument.getelementbyid(v=vs.110).aspx
Related
I want to take the "total member" number (on the right bar of the website) and display that number inside a label in C# windows form application. Here is the website: https://www.dojrp.com/
Thanks
Here is a solution to solve your problem:
Step 1. Get the html code of this website page using System.Net.WebClient class.
Step 2. Locate the "total member" number in the html code and get it using System.Text.RegularExpressions.Regex class.
Step 3. Assign that number to your label on your windows form.
I want to automate video uploading to asite. There is a textbox to enter tags there. So I want to paste my tags to that textbox and then click enter!
I used this code for click on 'Enter':
youporn.FindElement(By.XPath(".//*[#id='token-input-']")).SendKeys(Keys.Enter);
But I am getting an error:
The compiler doesn't know if you mean the Keys enum of System.Windows.Forms or OpenQA.Selenium. Change it to the following and your stuff works.
youporn.FindElement(By.XPath(".//*[#id='token-input-']")).SendKeys(OpenQA.Selenium.Keys.Enter);
for a recent schoolproject I need to make an ASP-website.
On the loginform I have a few validators and a validationsummary.
The summary itself works, but I would like to get the text from it,
so I could put it into my own custom "popup". The popup is just a twitter-bootstrap model wich I tweaked a bit so I can put in a title and some text easily from any code behind file.
Can anybody help me? Any c# code behind, or jquery solution is fine to me.
Try the solution in this answer:
Can I run some custom script after ASP.NET client side page validation fails?
Basically you call the Page_ClientValidate("") function and write custom JavaScript to display the alert
I have a html application program that works properly fine
I have to run this program from a c# program and fill its html input text tags from my c# program and then press the html button
I've got no idea how to do this
Could you please help me?
If I understood properly, you need to use WebBrowser control and navigate to your site (use WebBrowser.Navigate() method). Then (when navigation is completed) use the code to fill the inputs and click the button.
var document = yourWebBrowser.Document;
var searchField = document.GetElementById("IdOfTheInputField");
searchField.SetAttribute("value", "TextToWrite");
document.GetElementById("IdOfSubmitButton").InvokeMember("click");
I have an asp.net web page written in C#.
Using some javascript I popup another .aspx page which has a few controls that are filled in and from which I create a small snippet of text.
When the user clicks OK on that dialog box I want to insert that piece of text into a textbox on the page that initial "popped up" the dialog/popup page.
I'm guessing that this will involve javascript which is not a strong point of mine.
How do I do this?
You will have to do something like:
parent.opener.document.getElemenyById('ParentTextBox').value = "New Text";
What you could do is create an ajax modal pop-up instead of a new window. The semantic and aesthetic value is greater not to mention the data-passing is much easier.
http://www.asp.net/ajax/ajaxcontroltoolkit/samples/modalpopup/modalpopup.aspx