Control - ParseControl In Dotnetnuke Changing Onclick To Javascript Instead Of C# Method Provided, Strange Behavior?

Feb 18, 2010

Having some strange behavior here. I have some XSLT which generates some html with a few ASP.NET Link Button Controls

String mstring = sw.ToString();
var myctrl = Page.ParseControl(mstring);
foreach (Control Control in myctrl.Controls)

[code]...

View 1 Replies


Similar Messages:

AJAX :: Strange Behavior With GridView In A User Control?

Feb 6, 2010

I've got a user control that is displayed via a PopupControlExtender. The user control is a GridView that dynamically adds columns to the control to display the results of a SELECT statement. The PopupControlExtender correctly displays the control and the control displays the neccessary columns. However, when the control is first displayed, the column widths are ignored, despite that they are explicity set. If the control is displayed and then hidden, the column widths are acknowledged the next time the control is displayed.

Here's the user control when first displayed

[IMG]http://i285.photobucket.com/albums/ll48/chyron7/Miscellaneous/screenshot.jpg[/IMG]

Here's how its display after the first time

[URL]

View 4 Replies

MVC :: Strange Behavior On Form Submit?

Oct 14, 2010

i have a strange issue happening while submiting a form:i have this in my form:

<input type="radio" name="type" onclick="document.getElementById('Type').value='Publiser';" />Publisher <br />
<input type="radio" name="type" onclick="document.getElementById('Type').value='Advertiser';" />Advertiser
<%: Html.TextBoxFor(m => m.Type)%>

the javascript is working perfectly and changes the value of the textbox.the problem happens when i submit the form - what is extracteed by the model from the textbox is the string "on", and after the submit, it also changes the value of the textbox to "on".when i load the field with a value from the model, it goes ok, and does not change

View 2 Replies

Asp.net - Getting DropDownList Value Is Generating Strange Behavior?

Jan 3, 2010

I have a DropDownList on a page

[code]...

The problem I am having is that the following code is setting ParentID to 0 (which to me, obviously shouldn't be happening.

View 1 Replies

DataSource Controls :: Strange Behavior Of Cmd.ExecuteScalar()?

Jul 27, 2010

I have a simple procedure which updates a table. The procedure works fine and I have tested it in Management Studio. However when I am calling that procedure from code, nothing is happening. cmd.ExecuteScalar returns null when it should return the ID.Has anyone faced anything similar? Any pointers as to how this can be resolved?

View 3 Replies

Web Forms :: Strange Behavior MultiLine TextBox And GridView?

Nov 15, 2010

I have strange behavior when changing from ItemTemplate to EditItemTemplate. both the ItemTemplate and EditItemTemplate contain the same textbox with multiline. Except the ItemTemplate got the ReadOnly parameter. When the row is getting in EditMode and I enter the textbox everything is disabled. I click on another column that contains a label instead of a multiline textbox and get back in the textbox I can do everything. When I enter in the same row another MultiLine textbox I cannot do anything until I click on a label and get back in that TextBox. When the textboxes are in normal mode I don't seem to be having this issues. What is changed between the MultiLine and SingleLine textbox? What kind of PostBack or something could cause this strange behavior?

View 2 Replies

Web Forms :: Strange Dropdown List Behavior On Page Load?

Apr 3, 2010

I have a page with 14 dropdown lists. In the first page load (ie. not isPostback) I set the selectedIndex of the dropdownlists individually but I find that they are all set to the value I use for the last dropdownlist set. Here is the code

comboFirstJudge1.SelectedIndex = 0
comboFirstJudge2.SelectedIndex = 0
<so on for all the dropdown lists until the last one>
comboFirstJudge14.SelectedIndex = 4

The result is that all dropdown lists have SelectedIndex = 4. If I run the same code on a postback it works just fine (the first lists have SelectedIndex = 0 and the last one = 4).

View 6 Replies

Forms Data Controls :: Strange Behavior After Upgrading To Win 7/Framework 4.0?

Feb 9, 2011

I have a site that was sucesfully upgraded to Framework 3.5 on Vista with VS2008. Now however after installing VS2010 and upgraded to Win 7 wierd things are happenning and was wonderring if any of you have experienced this and how you've dealt with it.First thing I notice in my main page that the four user controls are not in alignment. They should appear side by side in a single row, however now they spread acros two rows with one on top and three on the bottom. Also my graphics and navigation is not where they supposed to be. Just for comparison, if run the existing solution on Win 2003 with VS2008, it works like it supposed to. All the formatting is handled in .css and that didn't change either.

[Code]....

[Code]....

View 1 Replies

Web Forms :: CheckBox Oncheckedchanged Event Causing Strange Behavior On Postback?

Jun 11, 2010

I have an issue that seems to only happen on my production server. I show or hide table rows whenever the buttons are clicked. However, when I do a postback on the checkbox, all of the rows become visible and the textbox stays empty. It works correctly on my test server and local workstation, just not in production.

Here is the markup...

[Code]....

Here is the code behind...

[Code]....

Here are the unexpected results whenever I check the chkShow2 checkbox... I am guessing this is a configuration issue on the server.

View 1 Replies

Web Forms :: Dynamic Usercontrol Loading When Using ParseControl() Method In VS2008

Oct 12, 2010

In the process of migrating an old VS2003 web app to VS2008, I'm running into this issue and haven't been able to find a resolution. Sample code: "Default.aspx" has a PlaceHolder(ToolHeader). In the Page_Load(), we dynamically load a user control passing in the virtual path to a helper method [public Control ParseUserControl(string virtualPath)]. This reads the content from the physical path, returns
a Control from ParseControl() method. I immediately get the following error when I open the default.aspx page in browser.

Parser Error

Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately. Parser Error Message: Could not load type 'DynamicUC.UcControl'.

Source Error:
Line 1: <%@ Control AutoEventWireup="true" CodeBehind="UcControl.ascx.cs" Inherits="DynamicUC.UcControl"&nbsp; %>

Can't figure out why it can't load the type. Namespaces are looking right. I try removing the Inherits="DynamicUC.UcControl" attribute from the "ucControl.ascx", it loads the page fine. Also, this control is a simple one and has no code behind. There are others with actual code behind. They won't work if I remove the Inherits attribute.

[Code]..........

View 3 Replies

AJAX :: ModalPopup / UpdatePanel From Codebehind, Inconsistent Behavior OnClick?

Aug 4, 2010

I have a simple form with a list of linkbuttons, each fires the same onclick event which sets an indicator image. I have a dummy button with style="display:none" which I have set as the TargetControlID of the modal.

onClick event from the imagebutton, the modal is shown via modal.Show(). The cancel button inside the modalpopup fires an event which turns off the indicator image and hides the modal via modal.Hide().

The events fire perfectly, it's very simple! Although after doing some testing I noticed the modalpopup is not presented after the 6-10th cycle of clicking the open event, then clicking cancel. The grey background appears but it is behind the main panel and the modal is either presented behind this or is just simply not displaying.

I spent hours researching various methods, implemented the CancelControlID to see if it was somehow tied to my call of modal.Hide() that fails.This occurs with an updatepanel only. The behaviour is much cleaner this way, so I would hope to be able to implement this. I have basically eliminated everything but these two events!

View 13 Replies

C# - Can Replace A Vendor-provided Method Used By A Page

Jun 25, 2010

Our internal HR application is developed by the vendor, but I've been given a requirement to change the behaviour of a certain piece of functionality without their assistance (which I don't want to do, but am investigating...). The functionality in question is an .ashx page which does a number of database lookups, and is called via javascript functions on a web page. We want to add one further database lookup.

We have control over the javascript code, so that's not a problem, but the code for the .ashx page is held in a compiled assembly. I've found where it is, and looked into it using .Net Reflector. Reimplementing the methods involved wouldn't be difficult, if it were technically feasible.

Can I create a new assembly, paste the source taken using Reflector into it, make my modifications, add the DLL to the application, and then set up a new .ashx to refer to it?

The bits I'm worried about not being possible are:

The code refers to some vendor classes held in other assemblies; can I just add references to those assemblies in Visual Studio to allow it to compile, and then when it's compiled and put on the server it'll all work?

Will I have trouble getting the web application to accept the new DLL, given that generally this application is not something we make changes to ourselves?

EDIT:

Some clarification: I'm not actually planning to replace the vendor's DLL with one of my own, that does sound like going a bit too far. Instead, I would make a new DLL with just the one function in it I need (based on stuff taken from the existing DLL using Reflector). I'd need that code to reference other utility vendor code so that it can get at classes needed to access the framework. I'd make a brand new .ashx page to serve up the code in the new DLL.

Luckily after all this I'm off the hook, because my customer agrees that things aren't desperate enough for us to attempt all this!

View 2 Replies

WCF / ASMX :: Pass Some Values To Price Method Of Provided Webservice

Jan 4, 2011

I want to pass some values to price method of provided webservice, but the parameter schema is like this:

[Code]....

how I must send the price parameter value? in array or as a class?

View 1 Replies

Javascript Onclick To Select Item With ListView Control?

Sep 19, 2010

I'm trying to implement a onclick event to select an item in a asp:ListViewControl.

<ItemTemplate>
<tr runat="server" id="MemberRow" onclick='<%#ClientScript.GetPostBackClientHyperlink(LvMembers, string.Format("Select${0}", Container.DataItemIndex)) %>'>
<td>

[code]...

However the onclick does not fire the ListView.Command or ListView.SelectedIndexChanging event? If I add a button with CommandName="Select" it works as expected? The POST data is the same!

{_EVENTTARGET=ctl00%24ContentPlaceHolder1%24LvMembers&_EVENTARGUMENT=Select%245&__VIEWSTATE=...}

View 1 Replies

Web Forms :: Onclick Method At Submitbutton Throws Error: Undefined Method

Dec 15, 2010

I don't know what I'm making wrong.I have a submit button, and on click it should execute the funktion in the code behind, but I get the error that the funktion is undefined.this is my code in the .aspx webform:

<%@ Page Language="C#" AutoEventWireup="True" MasterPageFile="~/DashMaster.master" CodeBehind="BI_MDR.aspx.cs" Inherits ="BI_MDR.StoredProc"%> [code].......

View 2 Replies

Javascript - Enhance A Composite Control's Client Side, My Approach Is To Recreate All Method On JavaScript?

Aug 30, 2010

I want to enhance a composite control's client side, my approach is to recreate all method on JavaScript, so here I have some troubles:Can I call onclick event on client side otherwise on server side?the statement table.onclick=SelectRow(event) fires a bug!Code:

function Control_Init() {
if( !(document.getElementById) ) { return; }
for( var i = 0; i < Controls.length; i++ ) {

[code]...

View 1 Replies

C# - Receive Error 'Unknown Server Tag' With Page.ParseControl On A Custom Server Control

Aug 4, 2010

I'm building a dynamic form using XML and XSLT. Anyway I'm using a custom asp.net control for CKEditor, it's an HTML editor.

When I try to add the controls from the XSLT using Page.ParseControl(<the-string-from-the-xslt-here>), I get a warning saying:

Unknown server tag 'FCKeditor.CKEditor'

And of course, if I remove the control from the XSLT everything is working fine and all the regular asp.net controls like TextBox etc get rendered to the string just fine. Does anyone know what I can do about it?

View 2 Replies

AJAX :: Programmatically Changing OnClick Within Child Controls?

Jul 22, 2010

I am trying to find a way to be able to programmatically change an update button's onclick eventhandler when that button is placed within an updatepanel. If i do not include the original onClick eventhandler function in the code-behind, the app wont compile. If i do include the original onClick eventhandler function, it executes when the button is clicked even after assigning a new onClick evnthandler function.

View 4 Replies

Same Behavior As ActionLink From Javascript Function?

Dec 21, 2010

I would like to update the content of a div using the result from an action method which returns a PartialView. The below code would do just this.

<%= Ajax.ActionLink("Update", "Comments", new { id = 1 }, new AjaxOptions { UpdateTargetId = "divComments" })%>
<div id="divComments" />
public ActionResult Comments(string id)
{
...
return View(photo.Comments);
}

Is it possible to have this update occur from inside a javascript method rather than from a link on the page?

View 1 Replies

Javascript - Is Possible To Remove A Behavior From An Element That Was Added Using $create

Nov 8, 2010

I am using the following code to create calendar controls on textboxes that have been dynamically created using cloneNode. The problem is that in IE it seems to add the behavior twice to the textbox causing it not to work. Is there a way that I can remove this behavior before it is added in ie only to prevent it from being added again? This works perfectly in firefox

var rawDateControlID = ctrlPrefix + 'txtStartDate' + tblPatientMedicationsRowCount;
var $tstCalendar = $("#" + rawDateControlID);
$create(AjaxControlToolkit.CalendarBehavior, { "id": $tstCalendar.attr("id") + "cld" }, null, null, $get($tstCalendar.attr("id")));

View 1 Replies

Javascript - Session Behavior - Open A New Window From Internet Explorer

Feb 4, 2011

I have a requirement to open a new window from Internet Explorer, but the new window should be in new asp.net session. It should not share the same session of previous opened window or the parent window. How can it be possible? Any thoughts? I'm using window.open('mywindow.aspx') from parent page javascript to open new windows.

View 1 Replies

Button Not Processing OnClick Method?

Dec 8, 2010

I have a button on an ascx control that calls a method on the onClick event:

<asp:Button id="bUpdateText" onClick="FUpdate" ValidationGroup="Update" CausesValidation="False" Text="Update" cssclass="button" runat="server" />

Normally I use this control on it's own page and the button works. This time round however, I am loading this control into a Div that is present on the home page of my site (that way I can show the contents with a little bit of JQuery). However, when I bring the control in this way, the onClick event doesn't fire and I am not sure what could cause that.

I don't have any code sample but the nature of the site makes it difficult to provide any that would make sense.

In short, what would stop this event firing now?

p.s I have tried adding validation groups to all other buttons and validation controls on the page and there is only ONE form present on the page.

EDIT: I have only just added the validation stuff in to see if that does anything. By default it has been like this and still didn't work:

<asp:Button id="bUpdateText" onClick="FUpdate" Text="Update" cssclass="button" runat="server" />

As mentioned as well, this works when I use this control on it's own page (loaded directly into Default.aspx) so I don't think the case of onClick matters.

EDIT2: I have just noticed that when I click this button, other validation controls on my page are being triggered even though they have their own DIFFERENT validation group?!

View 3 Replies

C# - Add Cache-Control: No-store In Authenticated Pages In DotNetNuke 5.4.4?

Jan 31, 2011

I would like to know what is the best way to include Cache-Control: no-cache, no-store in authenticated pages in DotNetNuke 5.4.4. In fact, I want to prevent caching in IE6/7 and FireFox as well.

View 1 Replies

C# - How To Span Tag Onclick To Call A Code Behind Method

Jan 9, 2010

How to make a span tag behave exactly like an asp:button (ie) using its onclick method to call a codebehind method..

<span onclick="MyPageMethod()"></span>

I know linkbuttons can do it for me,but my question is can span tag do it for me?

View 2 Replies

Web Forms :: ImageButton - Method In Onclick Triggered Instead Of Page_load?

Dec 2, 2010

If I use an ImageButton or LinkButton, I just noticed that when clicking either, the Page_Load method executes before the method specified in the OnClick. Can this be avoided so that the method in the OnClick is triggered instead of Page_Load?

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved