User Control Displaying In Wrong Place?
Aug 24, 2010
I'm trying to include a user control in an aspx page, it works fine, but my control does position itself where I want it and always appears at the very top of the page. Could it have something to do with the masterpage? I've tried registering the user control in the master page, but I don't know how to reference it in the content page.
In my Default.aspx page I register my usercontrol at the top:
<%@ Language="VB" MasterPageFile="~/Master-Pages/Landing1.master" AutoEventWireup="false"
Title="Home" CodeFile="Default.aspx.vb" Inherits="_Default" %>
<%@ Register Src="/Controls/News.ascx" TagName="HomepageNews" TagPrefix="uc" %>
Then in my page I try include the control:
<asp:Content ID="NewsArea" ContentPlaceHolderID="ContentBottomCol" Runat="Server">
<%@ Register Src="/Controls/News.ascx" TagName="HomepageNews" TagPrefix="uc" %>
</asp:Content>
View 1 Replies
Similar Messages:
Sep 27, 2010
I have a table that displays a user control on each row. The user controls are strongly typed to a viewmodel which contains DataAnnotation style validation. If one of the rows has invalid data entered (lets say the 3rd row) the data annotation validates display agains the first row/user control.How do I get the data annotation to show against the relevant user control?
View 1 Replies
Nov 8, 2010
[Code]....
View 6 Replies
Sep 1, 2010
<div id="nav-main" align="center" style="width: 95%; height: 35px;">
<div style="float:left; height: 29px; width: 260px;">
<a href="javascript:void(0);" onclick="select();"
[code]...
View 2 Replies
Dec 22, 2010
With the following code I create a combobox in a panel which is in the pane of an accordion panel.
[Code]....
Now when I click on the arrow of the combobox, the list is show somewhere else on the page and not where it should be.
It seems the list is not positioned relative to the textbox.
View 2 Replies
Apr 20, 2010
<siteMapNode roles="*"> <siteMapNode url="~/Default.aspx" title=" Main" description="Main" roles="*"/> <siteMapNode url="~/Items.aspx" title=" Adv" description="Adv" roles="Administrator"/>....
any user can see Adv page. That is a trouble and a qustion : why and how to hide out of role sitenodes.
little addition : <siteMapNode roles="*"> appears to all nodes If I don't do roles="*" on main node, all users can't see Main node ... And I SiteMapDataSource works only if there 1 node
View 2 Replies
Mar 1, 2011
I wanted to know how to add the feature- that user should be redirected to an error page where the error will be display, upon entery wrong username/password when trying to login through an asp.net login control?
1. how to redirect the user to an error page upon entering wrong username/password (from a login control which is placed on master page)?
2. how to pass the error to the error page so it can be displayed there?
View 28 Replies
Aug 1, 2010
I have a weird thing happening. I have two identical databases installed on one virtual machine but under two different instances of SQLServer. For some reason, periodically when saving from one it will save to the other instead. Using debug, I have verified that the connection string is correct and when the item saves, it still saves to the wrong database.I use session variable, and am of the belief that it might have something to do with it...and t hat when I go from one to the other it is still getting the connection string form the other for some reason.To make sure that it isn't a problem, I make sure that I completely close out one database before opening the other in a new IE window.I assume that when I completely close out an internet explorer window that it abandons all session states. Is that true?
View 7 Replies
Feb 3, 2010
Within an ASP.NET user control I have the line:
<div>Web: <a href="<%# Eval("Web") %>"><%# Eval("Web") %></a></div>
I'd like to change it so this HTML is only rendered if Web has a value.
I've tried wrapping String.IsNullOrEmpty(Eval("Web") as string) in server side script but Eval can only be used inside a "binding" tag.
What is the best way to do this?
View 2 Replies
Apr 24, 2010
I have two usercontrols usercontrol1 and usercontrol2.
Now I have a hyperlink in usercontrol1 on the click event of which I need to display i.e show usercontrol2(otherwise it is hidden).
So I add Reference to usercontrol2 as in code give below:
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="Rehabilitation.ascx.cs" Inherits="SlumManagement.Web.UC.Rehabilitation" %>
<%@ Reference VirtualPath="RRules.ascx" %>
Now RRules.ascx is usercontrol2.
Now the problem is that after adding reference I only get to access on the server side not Client side.
Once I get a reference to it on the client side I want to do something like this:
function displayctrl()
{
var ctrl = document.getElementById('usercontrol2');
ctrl.style.display = "block";
}
How can I be able to do this?
View 12 Replies
Jul 9, 2010
i have designed a usercontrol (ascx) and it was ran on local machine, i have uploaded that into the server after that its not displaying on the aspx pages, i have uploaded all the images, scripts, aspx, ascx, dll but i dont know why its not displaying?
View 8 Replies
Mar 5, 2011
I have an ajax tabcontainer on a master page that has a user control inside one of its tabs.The user control is just a gridview that gets a list populated from a DB table.The strange thing is that the gridview is displaying in VS, but when I build the site the tab is empty; no error message just nothing.Below is the code for the tab in my master page:
<ajaxToolkit:ToolkitScriptManager
ID="ToolkitScriptManager1"
runat="server">
[code]...
View 1 Replies
Jan 23, 2011
Situation: I have a drop down list which I need to pass on to a webservice on button click. I am using Sys.Net.WebServiceProxy.Invoke to make webservice call.
Everything is happening inside a usercontrol which loads on runtime using dynamicpopulate extender.
I get following error:
Sys.InvalidOperationException: Cannot serialize object with cyclic reference within child properties.
Situation: Usercontrol also has a listview which is bound to dataset. However on calling listview.DataBind() in side the webservice method.
I get following error:
The ListView control 'ProductsListView' does not have a naming container. Ensure that the control is added to the page before calling DataBind.
There is no problem when call to service method is parameter less and listitem is not bound.
View 5 Replies
Nov 23, 2010
I have a user control which contains a CustomValidator which is used according to whether a RadioButton is checked or not (there are several RadioButtons, I'm only showing the relevant one)
<asp:RadioButton runat="Server" ID="RadioBetween" GroupName="DateGroup" CssClass="date_group_options_control_radio" />
[code]...
There is some client + server side validation code (the server side code does exactly the same thing and is skipped for brevity)
<script type="text/javascript">
function ValidateDateFields_Client(source, args) [code]...
There are two instances of this control in the page. When running the client side version it hits the wrong one (the version of the control which is disabled). You can see from the generated HTML both are correctly specified. I'm not sure how .NET works out which clientside function to call given they both have the same name.
<script type="text/javascript">
//<![CDATA[
var ctl00_MCPH1_QueryTextValidator = document.all ? document.all["ctl00_MCPH1_QueryTextValidator"] : document.getElementById("ctl00_MCPH1_QueryTextValidator");
[code]...
Do i need to add something in to scope it? What's the best way to achieve this? If I disable the loading of the second control everything works fine.
View 1 Replies
Aug 1, 2010
I have a very weird thing happening. I have two databases that have exactly the same tables but different database names on the same virtual machine, but in different instances of SQL Server. For some reason, when using one of them, it will save to the other. In debug, looking at my connection string..I have verified that it is correct, yet when I allow the save, I look in the table and it isn't there, it is in the other database that is in a table with a completely different name and in a different instance of SQL Server.
View 1 Replies
Mar 29, 2011
I have this web application (LAN) that sends an email when users registers to one of our events.
The code is pretty straightforward:
[code]....
The application sends the email without problems. The issue is that somehow a third person is enlisted in the cc, and receives a copy of the email!. What could be the problem? The smtp? IIS?
View 2 Replies
Mar 4, 2010
i use the CreateUserWizard in order to create users. Asp.net generates automatically a password which is sent to the user by email.
The emailaddress must be like this: firstname.name@ourdomain.be . If 'firstname.name' doesn't exist in our Exchange server ('ourdomain.be'), then:
1) the user is still created
2) the message page with: 'Mailbox unavailable. The server response was: 5.1.1 User unknown' appears
E.g: if user John Wayne introduces by error Jhn.Wayne@ourdomain.be , then this user must not be created, and only a simple Alert-message must appear.
I tried a lot of Try / Catch / Endtry but all my attempts fail: the user is always created and the whole message page appears. I also tried with CreateUserWizard1_SendMailError sub.1
Here the aspx file:
[Code]....
View 3 Replies
Jun 5, 2015
At my work I have 2 logins, my main login "mike", and another one that we use to login into servers to manage applications, user "tech_mike"
On my machine I am logged in as "mike", I published the web-application to the server (through FTP). I RDP into the server using "tech_mike", and setup the application in IIS (create app, disable basic authentication and set windows authentication for the app)
Now when I want to test the application from my computer (user logged in "mike"), in the browser I type the link to the app [URL] and it tells me that I am not authorized. In the logs I can see that it is trying to login as "tech_mike", even though the user that I am logged in from my computer is "mike".
If I try to open the app on my local machine (local IIS), it is using the correct user "mike"
If someone else (another developer, he has "tech_user" account also) opens the app on the server: [URL] then he is able to login because it takes the correct user that is logged in into windows (not the "tech_user" account).
It seems only I have this problem because I connected through RDP (using different user) to setup the application in IIS on the server.
This is happening on all apps on the server that are using Windows Authentication, IIS (I think) somehow replaces my user "mike" with "tech_mike"
View 2 Replies
Jan 26, 2010
I have managed to place a dropdown control iniside a gridview control. The dropdown does indeed populate in each row... Question: How is it possible for the system to correctly select the text in the dropdown based on the value of the field which is driven from the database? Is it to do with the selectedvalue?
View 7 Replies
May 20, 2010
How to lock the user with the 3 times entering the wrong password?
View 10 Replies
Jan 21, 2010
I want to have only 1 placeholder on the page and depending on which buttons are pressed, different user controls are dynamically added. To add to the
fun of everything, I need to pass in different values for each user control.
I know that in order to have the values passed into the different user controls and bind to a certain list it needs to happen in the Page_Init inside of the .ascx.cs file - aside from that, I am lost.
View 1 Replies
Apr 4, 2011
I veguely remember that there was a login/logout control in my ASP.net class, but I don't know what options there are for managing user logins, the only one I'm aware of is the Windows Authentication mechanism.
View 2 Replies
Dec 11, 2010
i want to search a text in the database even if user writes wrong spelling.
I am using LIKE operator. But I am not getting exact result.
For example: I want to search 'Norrebro' if user types 'Norebro' (wrong spelling)
LIKE operator does not work in this case. So how can I get the exact result??
View 1 Replies
Nov 30, 2010
I was/am struggling with security for my first MVC applicaiton. It worked out great for me, but not for my users. I wanted to use Windows Authentication (and I seem to have that working). But when I was still trying to implement it, I was on one of our users computers where they were logged in. I navigated to the main Index page and used the supplied MVC login link and *MY* credentials. So now every time that user navigates to that page, it logs her in as me. We are using IE8, I have deleted all the cookies, passwords, forms information I can fine through Tools|Internet Options|Tool|Content|AutoComplete.
View 6 Replies
Jan 29, 2011
My web app has one main page, which is like a work bench. Within this work bench I have 3 placeholders that I load 3 different user controls into (only displaying one at a time). It works, and loads ok although it is very slow.
For instance; Each user control has a 'New' button. when I click this it takes anywhere from 3-10 seconds just to refresh the page, and display all the original default values.
I gues there is a lot of info being sent/returend to/from the server (The main workbench page, and the usercontol), but it still seems to be taking way too long. I have a customer using my application, and they have raised the issue, and have even experienced delays of around 30 seconds for simple tasks.
I have walked through my code with the debugger in vs2010 and nothing seems to take a long time. I have also used Firbug to try and find out what is going on, along with setting Trace="true" on the page to try and resolve the issue. Its all just numbers to me, I have no idea what is going on.
View 2 Replies