I'm trying to automate system login by using webbrowser control and do some processing after i have login-ed.
Normally, after login into the web, it will pop up a new windows. But then, i faced a problem,if automate login with WebBrowser control, the pop-ed up new window will ask me to login again. So i have searched for the solution, MSDN suggest to use axWebBrowser and ppdisp in order to keep track of the session.
Now the problem is, i have no idea how to control the axWebBrowser1 to get the HTML ID and set attribute towards the elements in the axWebBrowser page.
I can set value to the element using webBrowser control, as below:
but i cant set it like this with axWebBrowser control... is that anyway that i can use webBrowser control and also maintain the session without using axWebBrowser control?
One of our WebScrapping project asks for a parameter of type AxSHDocVw.AxWebBrowser() so when I gone to create an object of AxSHDocVw.AxWebBrowser()
AxSHDocVw.AxWebBrowser oBrowser = new AxSHDocVw.AxWebBrowser();
it has thrown System.Threading.ThreadStateException: ActiveX control '8856f961-340a-11d0-a96b-00c04fd705a2' cannot be instantiated because the current thread is not in a single-threaded apartment. It is working fine when using with Windows app.
Here it goes, I've been asked here to create a WebService that will work on .NET framework 1.1 so other project can interact with it to get the job a little .dll(1.1 also) can do.
The main idea behind this is to be able to upgrade the application and the rest of the projects while being able to use this old .dll through the WebService.
Is it possible to comunicate with a WebService that works on the framework 1.1 from an ASP application working on 2.0 or higher.
Actually, what I've tried raise an error like so : The request failed with the state HTTP:401 : Access Denied.
But when I access the webservice(asmx page), it does work, the page shows all the method available. Also the project build perfectly.
So I'm completely new to web development, but I hope to reach a level of knowledge on how to build a Web Server that can interact with my TCP program, like a chatbox basically. How can I achieve this and where should I start learning?
on the basis of above interact with database i also want some animated output to appear such as "smile should increase if student secure above 90 marks"or if not then "smile should decrease" hough i know it all need a huge knowledge of actionscript and asp.net along with c#...
I have on site three textbox controls, RequiredFieldValidator with each textbox and button (without any code). I have problem, when I set autopostback property of textbox controls to true. Regardless, that EnableClientScript sets to true or false, validation error dissapears - or show only few seconds. Helps only set CausesValidation property of textbox to true. And my question - if autopostback is set to true, should I set causesvalidation to true too to make proper validation process? Why it doesn't work?
I have a C# program used to build and deploy a suite of websites.
I would like to programatically interact with IIS so that it changes where the virtual directory for a test system points to based the result of the build.
Im using some animationExtenders in my project. The thing is, the objects to be animated are created programmatically, hence i need to also build programmatically the javascript code that will interact with them.
It runs properly but, when i interact with these animated controls and the javascript functions are supposed to get to work, i keep getting the usual run-time error saying that the javascript functions are not defined. But, if i check the final html code generated, i can see how all the controls i built programmatically are there ,as well as the script.
Tried both RegisterStartupScript and RegisterClientScriptBlock, no luck.
I have an ASP .NET 2.0 (4.0 is an option) page that I've embedded the Windows Media Player to using OBJECT tags.
The player is connecting to a Windows Media Services publishing point on the Web server. This is on a 2008 server.
Everything works great, see it here: [URL]
If I understand correctly, the information the player is showing in its status bar comes from the ID3 tags of the current track. Continuing on this line of thought, the ID3 information must be coming to the player from the media server. Correct?
What I want to do is collect and use the information about the track that's current being played. I'd like to be able to create a custom display for the current track information. I'd also like to put a custom value in the track information to look up additional information about the artist/track from a database.
do you think it would be difficult to write a framework where mvc compares last html it output to the current html we want to output, and instead of sending the entire html, figure out what has changed and generate js code that will do the updating as compared to previous html? (presuming nothing was manually changed on the client using js).
The following seems reasonable, but it returns an error:
<asp:Repeater ID="RepeaterF" runat="server" DataSourceID="DSF" > <ItemTemplate> <% If Eval("Item_Batch") = 0 Then %><tr><td></td><td colspan="2"></td><td></td></tr><% Else %>........
Error: "Databinding methods such as Eval(), XPath(), and Bind() can only be used in the context of a databound control."
I am finding it difficult to accept that the whole Repeater approach has any benefits over just creating a loop in code, iterating through a recordset, and building a html table into a variable, then dumping it to the page. This repeater is spawning pages of code and objects, and surely this is all using up server resources.
I have to break a HTML content string in to multiple lines. And each line should have some fixed characters, 50 or 60 Also I don't want to break the word..or html tags...
ex : <p>Email: <a href="mailto:someone@gmail.com">someone@gmail.com</a></p> <p><em>"Text goes <font color=red>Hello world</font> Text goes here and Text goes here Text goes here 1976."</em> </p>
I think I need to drop in some escape characters, but I'm not quite sure where. Here is the javascript function I'm attempting to call:
function setData(associateValue, reviewDateValue) { var associate = document.getElementById("Associate"); var reviewDate = document.getElementById("ReviewDate"); associate.value = associateValue; reviewDate.value = reviewDateValue; }
Here is the asp .net mvc line where I'm attempting to create a Radio button with a click event that calls the above function and passes data from the model as javascript parameter values.
<%= Html.RadioButton("Selected", item.Selected, new { onClick="setData('<%=item.Associate%>','<%=item.ReviewDate%>' )" } )%>
The above throws a bunch of compile issues and doesn't work. A call such as the following does call the javascript, but doesn't get the data from the model.
I have some data which is HTML format saved in database. Like the chat as follows.
Roy, 2/11/2011: Sree, 2/11/2011:
But it gets saved in some HTML format in Database as follows.
[code]....
So, Is there any ways that I can show this in Text box as what I need. While debugging the code, when I did HTML Visulaliser, it showed me correct format. How can I achive this in my Textbox control.
I have a textbox which I need to enter html code into (like < strong> or < em> for example).The trouble is this is causing an error writing this back to the database. A potentially dangerous Request.Form value was detected from the client (tbVOther="< strong>testIs there a way around this without turning off the request validation setting?
I am attempting to replace this god awful collection of regular expressions that is currently used to clean up blocks of poorly formed HTML and stumbled upon the HTML Agility Pack for C#. It looks very powerful but yet, I couldn't find an example of how I want to use the pack which, in my mind, would be a desired functionality included in it. I am sure I am an idiot and cannot find a suitable method in the documentation. I had the following html:
<p class="someclass"> <font size="3"> <font face="Times New Roman">[code]....
When I utilize the HtmlNode.Remove() method it removes the node plus all it's children. Is there a way to remove the node preserving the children?