web-controls

Working with frames in webbrowser Control

点点圈 提交于 2019-12-07 15:08:39
问题 I am using <webbrowser>.Document.Window.Frames to get frames. My <WebBrowser> having 2 frames.My only problem is ,I seem one at index 0, but not 1. Any help? HtmlWindow wf = wb.Document.Window.Frames[1]; string s = wf.Document.Body.OuterHtml; and view source <frameset rows="0,*" border="0" frameborder="0" framespacing="0"> <frame name="entrustTruePassAppletFrame" src="EntrustTruePassApplet.html" marginwidth="0" marginheight="0" scrolling="no" noresize> <!-- It is mandatory for the frame where

How to force a IE version in a Winform WebControl?

岁酱吖の 提交于 2019-12-07 14:39:44
问题 I was trying to find out the problem in one web design I had and remembered to use a simple javascript to get the browser version as I had completly 2 different behaviors so I add this: <div id="example"></div> <script type="text/javascript"> txt = "<p>Browser CodeName: " + navigator.appCodeName + "</p>"; txt+= "<p>Browser Name: " + navigator.appName + "</p>"; txt+= "<p>Browser Version: " + navigator.appVersion + "</p>"; txt+= "<p>Cookies Enabled: " + navigator.cookieEnabled + "</p>"; txt+= "

Base class includes field but type not compatible with type of control

大憨熊 提交于 2019-12-06 18:29:49
问题 The base class includes the field 'lbl', but its type (web.App_Code.CustomLabelControl) is not compatible with the type of control (web.App_Code.CustomLabelControl). I had done many custom controls before the same way but Hell this error is driving me nuts. I have a web application project with the below class in App_Code directory a tagprefix reference in web.config for the control in class. What do I do now? Web.Config <system.web> <pages> <controls> <add namespace="web.App_Code" tagPrefix=

How to use jquery Datepicker in web control in asp.net?

只谈情不闲聊 提交于 2019-12-06 15:13:37
问题 i am creating a web-control and i want to use jquery date-picker on this control, i have tried the below things: 1). apply all the required jquery code in web-control( but it does not work for me. ) 2). apply all the required jquery code in page where i am calling that web-control( but it does not work for me. ) Please help me, Actually what is my purpose to do it is: i want to create a generic module for search, to which i will just pass the name of table it would be work automatically, what

MFC : How to capture a link click event in a web browser control?

天大地大妈咪最大 提交于 2019-12-06 05:10:27
I have an MFC application that has a webcontrol. When clickable links are clicked, it opens using IE, not the default browser. Questions : Is there a way to force it to open using the default browser? If not, how do I capture the Link Click event so I could just manipulate the click event later? Thanks... No, not as far as I know. Check out the articles on http://ehsanakhgari.org/article/visual-c/webbrowser-goodies . It has a number of articles that show how to set up an event sink using IDocHostUIHandler etc. to handle events like clicking of links. I'm not sure which interface to implement,

How to force a IE version in a Winform WebControl?

烂漫一生 提交于 2019-12-05 20:33:58
I was trying to find out the problem in one web design I had and remembered to use a simple javascript to get the browser version as I had completly 2 different behaviors so I add this: <div id="example"></div> <script type="text/javascript"> txt = "<p>Browser CodeName: " + navigator.appCodeName + "</p>"; txt+= "<p>Browser Name: " + navigator.appName + "</p>"; txt+= "<p>Browser Version: " + navigator.appVersion + "</p>"; txt+= "<p>Cookies Enabled: " + navigator.cookieEnabled + "</p>"; txt+= "<p>Platform: " + navigator.platform + "</p>"; txt+= "<p>User-agent header: " + navigator.userAgent + "<

Required Property in Custom ASP .NET Control

血红的双手。 提交于 2019-12-05 16:33:32
I am making a custom web control for my ASP page that inherits from CompositeDataBoundControl. I have a public property in the definition of my control that is required , if the user does not provide this property in the control definition on an ASP page it will break and we will get an exception. I want the compiler to throw a warning similar to the one when a user forgets to provide the 'runat' property of a Control. "Validation (ASP.Net): Element 'asp:Button' is missing required attribute 'runat'." Here is basically what my code looks like: public class MyControl : CompositeDataBoundControl

Only Content Controls are Allowed (C# webcontrols)

江枫思渺然 提交于 2019-12-05 05:54:38
So, I'm not sure what's going on. My boss wasn't pleased with me using MVC and Razor, so I'm being forced to code with this nasty webcontrol/codebehind style. =/ The error is: Only Content controls are allowed directly in a content page that contains Content controls. Here is the masterpage: <%@ Master Language="C#"%> <!DOCTYPE html> <html> <head> <title>Application Form</title> </head> <body> <div id="container"> <asp:contentplaceholder id="contentPlaceHolder" runat="server" /> </div> </body> </html> And here is the Default.aspx page that's throwing the error. <%@ Page Language="C#" Inherits=

Is it possible to add a web user control to a class library?

纵然是瞬间 提交于 2019-12-05 03:54:30
I'm looking at building some web user controls with an eye toward re-use, but I can't seem to add a Web User Control in my class library in VS2008. Is there a way to work around this problem, or is there a better approach to creating reusable controls? You can create either Web User Controls or Web Custom Controls that encapsulate the functionality you need. The main difference between the two controls lies in ease of creation vs. ease of use at design time. You should maybe consider creating a Web Custom Control library. There is a walkthrough for creating a web custom control using the Web

Base class includes field but type not compatible with type of control

好久不见. 提交于 2019-12-04 23:46:25
The base class includes the field 'lbl', but its type (web.App_Code.CustomLabelControl) is not compatible with the type of control (web.App_Code.CustomLabelControl). I had done many custom controls before the same way but Hell this error is driving me nuts. I have a web application project with the below class in App_Code directory a tagprefix reference in web.config for the control in class. What do I do now? Web.Config <system.web> <pages> <controls> <add namespace="web.App_Code" tagPrefix="CControls"/>... Markup <form id="form1" runat="server"> <div> <CControls:CustomLabelControl runat=