w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML Categories
Is there a way to get to the HTML controls on an ASP.NET page?
If you add "runat="server" to most normal html controls, you can reference them in code-behind. These are in the System.Web.UI.HtmlControls library. Example: an HtmlAnchor for the <a> tag can be found in MSDN here with a code sample at the end.

Categories : Asp Net

Duplicated footer html/css on another page, but shows up differently?
I think maybe a tag wasn't closed. But this is what I added: #footer{ width: 860px; margin: 0 auto; } And it seems to be working. Fiddle

Categories : HTML

"Noscript" Shows Raw HTML when the Page is Reloaded without JavaScript
While this is a bug, you could use this work around: <div class="nojs"><noscript>This website requires JavaScript to run. Please </noscript><a href="activatejs.php"class="link" target="_blank"><noscript>enable it</noscript></a><noscript> or use a web browser that supports JavaScript.</noscript></div>

Categories : Javascript

How to restore dynamically created HTML table/controls on Page refresh?
All controls must be rebuilt in Page_Load so that event handlers and value binding can occur. So, if you create the controls initially in an event handler then you need to cache enough data in Session, or ViewState, so that you can rebuild those controls on Page_Load. A lot of times a basic Tuple will work to provide enough information for those controls to be recreated. A little note though. You're going to need to ensure you set the ID property the first time they are built and when they are rebuilt. That's how value binding occurs.

Categories : C#

How do I find the HTML file that shows the sub navigation on profile page in Buddypress?
Frisco inherits lots of files from BP Default. Look in this file: /members/single/profile.php This function bp_get_options_nav(); returns that menu.

Categories : PHP

RaiseEvent between User Controls where there are multiple instances of the same controls on one page ASP.net
The solution I found to this problem is from an old article from 2002 on Code Project. Here's the link to that article ASP.NET User Controls - Notify One Control Of Changes In Other Control. After reading that article and looking through sample code, here are the following changes I made to the code above. There are no changes to the ASPX files except the following line in the Output ASPX file should be removed. <%@ Reference Control="~/Input.ascx" %> First you add a new class called LabelChangeEventArgs. Public Class LabelChangeEventArgs Inherits EventArgs Private _LabelStr As String Public Property LabelText() As String Get Return _LabelStr End Get Set(value As String) _LabelStr = value End Set End Pro

Categories : Asp Net

Upgraded Grails app compiles but goes straight to Tomcat 404 Page
Try the following : grails clean grails refresh-dependencies grails run-app --stacktrace If it still fails: Increase the log level to debug Compare core dependencies between your app and a freshly create app, and update dependencies as needed Check the grails version compatibility of your third-party plugins and third-party dependencies, update as needed Repeat the grails clean, refresh-dependencies steps. If it still fails, delete the .grails/projects/YOUR_GRAILS_VERSION/PROJECT_NAME and repeat the initial steps. Hope it helps

Categories : Tomcat

Using php cookie to detect if vistor has submitted email, if so take him straight to sales page
Why do you want to have exit in if condition ? You are any ways redirecting so i guess that is not required Also what if customer comes after one month why will you ask for email again. What if he clears his cookies? He will be prompted for the email again. I would suggest you to store his email and check from database itself instead of cookies, if the email exist and then redirect him accordingly. Hope it helps you.

Categories : PHP

Finding controls on load events of a page that is inherited from Master page
if you are trying to find control inside the master page you should this.Master.FindControl("controlName"). Other case is with you are inside master page and want to find a control inside a page so you should ContentPlaceHolder1.FindControl("controlName"). Please also check: How to access content page controls from master page in asp.net Nested Masterpages and .FindControl

Categories : C#

Parsing RSS in a Ruby on Rails project shows the html as inline html
The way you're processing and displaying the RSS in a view isn't the way I'd do it, but the quick answer is that you need to call html_safe for any HTML strings you build in this way. This may be unsafe, as the incoming RSS data may have code in it that causes cross site security issues. You can handle that by using the sanitize helper. I think the sanitize helper automatically calls html_safe for you. So, at the end of your blog_feed method, replace the html return value with: sanitize html Check out the documentation for sanitize here: http://api.rubyonrails.org/classes/ActionView/Helpers/SanitizeHelper.html#method-i-sanitize

Categories : Ruby On Rails

I want to convert this html code using html helper into cakephp But it shows unexpected Behaviour in my layout. How can i fix it?
try this code snippet <?php echo $this->Html->link('Company' . $this->Html->tag('b', '', array('class' => 'caret')), '#', array('class' => 'dropdown-toggle', 'data-toggle' => 'dropdown','escape' => false)); ?>

Categories : Cakephp

Best way to access controls on parent page from a child page popup?
you can try to use javascript, suppose A.aspx is parent page and B.aspx is the open page, you can use "opener" to contronl DOM of A.aspx. A.aspx link tag and javascript : <a href="B.aspx" target="_blank">open page B</a> <script type="text/javascript"> function fun_A() { alert("hello"); } </script> B.aspx <input id="btnChild" type="button" value="call function in Page A" onclick="opener.fun_A();" /> when you open B.aspx from A.aspx, and click the button from B.aspx, you will see A.aspx alert message "hello". hope this can help you.

Categories : Asp Net

How do I find all controls of a particular type from a page inside a master page?
RadComboBox exposes an array at client-side that contains all RadComboBox instances. This array can be accessed like: Telerik.Web.UI.RadComboBox.ComboBoxes For example: If RadComboBox controls are embedded in another control, you can simply get these controls from the array described above. Here is an example of radcombobox nested inside a Grid: <telerik:RadGrid ID="RadGrid1" runat="server" ...> ... <EditItemTemplate> <telerik:RadComboBox ID="RadComboBox1" runat="server"></telerik:RadComboBox> <telerik:RadComboBox ID="RadComboBox2" runat="server"></telerik:RadComboBox> <telerik:RadComboBox ID="RadComboBox3" runat="server"></telerik:RadComboBox> </EditItemTemplate> ...

Categories : C#

pChart2 renders graph in seperate php page but shows gibberish in main page
pChart can either render its output to a file, or as a stream of binary data with an HTTP Content-Type of image/png. So the easiest way to incorporate pChart with a webpage is to place the charting/drawing functions in a separate PHP file, then call that separate script from within your HTML via an image tag: <img src="yourPChartFile.php"> which will display the image generated from the script because the separate script is returning an image/png that your browser can render. If you insist on creating the chart in the same PHP file as your HTML page, you have to save the pChart script results to an image file (via $myPicture->render("FILE_NAME_HERE.png")) in a location your webserver can access, then link to that generated file in your <img> tag. All this is described in

Categories : PHP

Access child page controls from base page
Here is complete sample code how you can access ContentPlaceHolder: First master code (Site1.master): <%@ Master Language="C#" AutoEventWireup="true" CodeBehind="Site1.master.cs" Inherits="WebTesterInherit.Site1" %> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> <asp:ContentPlaceHolder ID="head" runat="server"> </asp:ContentPlaceHolder> </head> <body> <form id="form1" runat="server"> <div> <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server"> </asp:ContentPlaceHolder> </div> </form> </body> </html> Now custom class that inherits from Page: public class MyPage: System.Web.

Categories : C#

node.js page in different tabs shows the same page source code
Yes, it's because your browser caches page sources and when you are trying to view it, shows the latest loaded page. If you add some logging, you'll understand what i mean. http.createServer(function (req, res) { res.writeHead(200, {'Content-Type': 'text/html'}); res.write('<p>' + Math.random() + '</p>'); res.end(); console.log('Message has been sent'); }).listen(3000); When you open your page in new tab, you can see in console that browser loads new version of it. But when you trying to view the source browser doesn't load anything. If you want to avoid this behaviour, try to reload the source, after you open it.

Categories : Node Js

Showing html page inside a php page by echo the html page contents
hmm, a simple html page: <html> <head> <title>Page title</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link type="text/css" rel="stylesheet" href="your-style-file.css" media="all" /> <script type="text/javascript" src="your-javascript-file.js"></script> </head> <body> <div id="div-tag">A div tag</div> <script type="text/javascript" src="another-javascript-file.js"></script> </body> </html> You can load external html file via javascript (or jquery load()). like this: $('#div-tag').load('external-file.html'); Or via php, like this: $external-html = file_get_contents('external-file.html'); print $external-html; Check your javascript, mayb

Categories : PHP

What url-patern should I use in ADF in the web.xml to protect a page? The URL shows the previous page.
I found the way to refresh the URL so the new URL gets the new page name on it. Go to your task flow and add <redirect/> inside the view tags that you want their URL's to be refreshed. <view id="help_id"> <page>/help.jspx</page> <redirect/> </view> This is what the Jdev help says about the redirect tag: Redirect: Choose true if the ADF controller should issue an HTTP redirect for a view activity request. The redirected request creates a new browser URL for the view activity. The original view URL is no longer used.

Categories : Security

Why does Html.TextBoxFor and Html.LabelFor shows different value?
Html.LabelFor reads the metadata from a model property and displays the name of the property. You can configure the displayed name with the Display or DisplayName attributes. Your model has no properties, so LabelFor is completely useless in your example. What do you want to achieve? When you want to render a label with the value of the string just create a label: <label>@names</label>

Categories : Asp Net Mvc

pass a javascript variable within a html page into a html form (on the same page) for submission to perl cgi
Add a hidden field. Set the value in that field to the value of the variable in Javascript. <form action="cgi-bin/runalg.cgi" method="post" enctype="multipart/form-data"> [...] <input type="hidden" name="ID" value="default"> </form> And then on javascript: <script type="text/javascript"> document.forms[0].elements["ID"].value = getValue("ID"); </script> The index for the form may vary in your document.

Categories : Javascript

ASP.NET Error: Content controls are allowed only in content page that references a master page
The page that you've put the content control is not a master page based page. Check the top of the page, if you've got html like <html> <body> tags then the likelihood is that you've created a new page rather than a new page based off a masterpage.

Categories : Asp Net

Controls that don't render any HTML
Server controls may or may not render HTML depending on how you use them, for example I use the Literal control to output text to the page and Labels where I want to "associate" text to another control - but essentially HTML output is the same. What is it you are you trying to acheive?

Categories : HTML

Appending controls to Page in MVC
these links can help you in regards to papulate views in mvc http://www.asp.net/mvc/tutorials/mvc-4/getting-started-with-aspnet-mvc4/intro-to-aspnet-mvc-4 http://www.asp.net/mvc/tutorials/older-versions/views/asp-net-mvc-views-overview-cs

Categories : Asp Net

How do ASP.NET server controls get converted to HTML?
The Page has a Render method, within the page hierarchy (process runs after PreRender page event). This Rendering process navigates through the control hierarchy of the page, and calls the Render method on each control. label has a Render method that renders a label or span accordingly, and the Rendered HTML flushes to the browser. When you drag a control onto the page in the Visual Studio designer (or other tool), it places that control within a hierarchy that contains all of the page's controls, so the Label would be rendered within the hierarchy. For instance, if you had: Page Panel control Label control The label will be rendered within the markup of the panel, since the Panel is the parent of the Label.

Categories : Asp Net

Is using HTML controls in asp.net effective than using asp.net control.?
If you definitely do not want to add ViewState overhead, then use HTML controls rather than ASP.NET server controls. But beware, ViewState is the glue for a lot of ASP.NET server controls being able to "remember" their values between post backs to the server. If you want more control over the output HTML, then use HTML controls, because the HTML control will map directly to the corresponding HTML element, rather than be rendered as potentially another HTML element or group of HTML elements, for example: ASP.NET Literal server control will not render as an element, but rather just text. ASP.NET GridView server control will render as an HTML table container, by default, and then literal text for BoundFields and various other elements for TemplateFields. ASP.NET CheckBoxList server control

Categories : C#

asp:controls transfromations from html form
That particular element would actually be a TextBox MSDN TextBox It would look like this <asp:TextBox runat="server" ID="Email" CssClass="contact-form" />. this would then render <input type="text" id="_Email" class="contact-form" /> The Literal control doesn't produce an HTML element and allows you to add text/html to your page and not wrap it in any other HTML. The Label control actually outputs a <span></span> and puts your Text in between it.

Categories : C#

Creating html controls on the fly (reflection?)
you can use mvc htmlhelpers. for example a flexible htmlhelper for dropdownlist that accept collection and other parameters. another htmlhelper to get collection and delivers listbox and ..... and in your view you can use of this htmlhelpers by their types.

Categories : C#

is that possible to add controls into WebUserControl from aspx page?
You load controls dynamically via control.add method. First get an object of user control and then use control.add property for that. See following link for the reference. http://msdn.microsoft.com/en-us/library/aa287574(v=vs.71).aspx

Categories : C#

ajaxtoolkit controls won't allow page to load
Make sure you have added the ScriptManager to your Masterpage - or standard Web forms if not using a MasterPage. This needs to go inside your <form runat="server"> tag <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>

Categories : C#

Looping through controls on a page using a masterpage
To access the controls in your child page do the following steps: 1-declare a variable of the type you want to access. For example if you want to access a Label in your child page use: Label lbl_child=this.ContentPlaceHolder1.findcontrol("your label id in child page") as Label; Now you have your label and you are free to make changes on it. Every change on this control will be reflected on the child control. ContentPlaceHolder1 is your contentplace holder id so change it with your content id.

Categories : C#

how to Disable All controls on the Silverlight Page
Setting the IsEnabled property to false of the parent control should disable child controls. http://msdn.microsoft.com/en-us/library/system.windows.controls.control.isenabled(v=vs.95).aspx

Categories : Misc

HTML Video IE9 - No Controls or Preview Image
It was due to the fact that the video object was faded in by jQuery after the documented loaded and a link was clicked - I assume it was because of the fading transition that IE9 couldn't handle the video object properly. What I did was allow the fade in, and once complete I cloned the video object to reinstantiate it.

Categories : HTML

HTML (table) elements with dynamic controls?
You have different ways: 1. Use only one row to add or edit a record and use a gridview or repeater to show data 2. use gridview in editmode (but i'm not expert about this) 3. you can put controls in gridview or repeater and manage all events using item/rowcommand

Categories : C#

WPF Grid vs HTML Div, Is it possible to prevent controls overlap?
I think you must use a layout container. However, Grid is also a layout container. If you don't want to use a StackPanel or any other control which behaves like you described, you can also define rows and columns inside of a Grid. <Grid> <Grid.RowDefinitions> <RowDefinition /> <RowDefinition /> </Grid.RowDefinitions> <Label Content="Firstlabel" Grid.Row="0" /> <Label Content="Secondlabel" Grid.Row="1" /> </Grid> You can also set the width of the RowDefinition.

Categories : C#

Convert html page to a image using webbrowser in asp.net taking Too much time to generate image of heavy html page
I changed your class a little bit and it now uses async/await instead of busy-waiting. You can use it as var th = new WebsiteThumbnailImage("http://www.google.com", 1024, 768, 256, 192); this.BackgroundImage = await th.GenerateWebSiteThumbnailImage(); . class WebsiteThumbnailImage { public WebsiteThumbnailImage(string Url, int BrowserWidth, int BrowserHeight, int ThumbnailWidth, int ThumbnailHeight) { this.Url = Url; this.BrowserWidth = BrowserWidth; this.BrowserHeight = BrowserHeight; this.ThumbnailHeight = ThumbnailHeight; this.ThumbnailWidth = ThumbnailWidth; } public string Url { set; get; } public int ThumbnailWidth { set; get; } public int ThumbnailHeight { set; get; } public int BrowserWidth { set; get; }

Categories : C#

CKEditor shows me html code
Try this in your template: <div id="post"> <h1> {{ post.title }}</h1> <p>{{post.content|safe}}</p> <i>{{post.date}}</i> </div>

Categories : Django

Looking for controls on parent page from DevExpress ASPXPopUpControl
You should expose all controls from ucA as properties, then look for the control inside the DevxPopup the same way you doing. Given that all the controls that you need at the ucA has properties to access them, you could do all the logic you need! Example: public ucA : UserControl { public string myTextBoxText { get { return ((TextBox)Controls.FindControl("myTextBox")).Text; } } /*And lot of controls*/ } Then you looking for the popup at the Form var ucA = (UcA)Form.Controls.FindControl("myPopup").Controls.FindControl("myucA"); ucA.myTextBoxText = /*Do stuff here with the text*/ Hopes this help you!

Categories : C#

Two Web User Controls inside a page: lifecycle
To find out turn on page tracing by using the page directive Trace="true". To make trace output show up, then you need to add Trace.Warn statements to the events of the objects you are interested in, such as: In Page_Load of the .aspx page: Trace.Warn("MyPage.aspx - Inside Page_Load event"); Here is the documentation for How to: Enable Tracing for an ASP.NET Page.

Categories : C#

Creating and finding dynamic controls on a page
you are creating the dynamic controls in javascript? i.e. you are creating html elements in javascript. It won't matter even if you put a runat="server" attribute in there, because it is still at the client-end. That would not be a part of the viewstate bag, so not populated in the controls collection. you need to change your logic. create dynamic control in code-behind on button postback.

Categories : C#

Anchoring Controls in Web Page Just Like WinForm Applications
try this <div> <asp:TextBox ID="TextBox1" Width="75%" Style="float: left;" runat="server"></asp:TextBox> <asp:Button ID="Button1" Text="test" Width="10%" Style="float: right;" runat="server"> </asp:Button> <asp:Label ID="Lbl1" Text="test" Width="10%" Style="float: right;" runat="server"></asp:Label> </div>

Categories : Asp Net



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.