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


Similar Messages:

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

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

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

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

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

Web Forms :: Behavior Of DropdownList In Firefox?

Mar 16, 2011

I am facing an issue. I have a web application in ASP.NET and C#. On a page I have a drop down list, which works fine in IE. However in firefox if I click on the dropdown, it get expanded, now if i type some charcter, relevant value get selected, now if i click out side the dropdown anywhere on my page, dropdown collpased, new value is shown as selected but no post back occurs. I even put a client side function to call on change of value, but that also didn't get called. However if i again click on my page post back occurs and selectedindexchanged event of that dropdown is called.

View 8 Replies

State Management :: Strange Connection Between ViewState And DropDownList's SelectedIndexChanged Event?

Sep 20, 2010

I have this code (just for example):

[Code]....

The Code-behind file looks like that:

[Code]....

So, when i use

[Code]....

SelectedIndexChanged event doesn't fire for the first item of the DropDownList. For any other item SelectedIndexChanged fires, but not for the first one.Could someone, please, explain what kind of magic is it?(I use Visual Studio 2008)

View 2 Replies

Forms Data Controls :: AppendDataBoundItems On DropDownList Causes Odd Behavior?

Sep 14, 2010

I may just thinking wrong about this but I have a problem that is causing me to want to pull my hair out:

I have two DropDownLists. Call them ddl1 and ddl2. I am binding ddl1 to a DataTable on page_load using if not IsPostBack and allowing view state to keep it populated.

I am then binding ddl2 to another DataTable based on the selected item in ddl1 on the SelectedIndexChanged event on ddl1. My problem is that when I set ddl2's AppendDataBoundItems="true", it just appends the items in the DataTable each time I select a new ddl1 item, so that if I change the selected item in ddl1 3 times, I end up with items in ddl2 from the 2 previous selections as well as the current ddl1 selection.

This doesn't happen when I set ddl2's AppendDataBoundItems="false". Obviously, this is not desiariable behaviour.

View 3 Replies

Vb.net - Strange IIS/ASP.NET JIT Compilation

Jan 19, 2010

I've got extremely strange behavior on one of my pages. I was able to get a work-around in place, but I'd like to get input on why this error is happening (and why my work-around actually works).

(Let me also say that this is in no way, shape, or form my code...so please don't bash me too hard)

When loading the page, we're getting

BC30456 'InitializeCulture' is not a
member of...

I worked through the tips here and nothing worked:

BC30456 Fixes

I was able to get the page back up and working by changing

<%@ Page Language="VB" AutoEventWireup="false"
CodeFile="newsproduct_rss.aspx.vb" Inherits="product_nrss" %>


to

<%@ Page Language="VB" AutoEventWireup="false"
CodeFile="newsproduct_rss.aspx.vb" Inherits="product_nrss" Debug="true" %>

View 3 Replies

C# - Strange Error From PDF4NET

Nov 30, 2010

I am using pdf4net to export PDF file. In C# I created complete logic to export data. A large part of it is legacy code so I know for sure that it works. But there is one little problem. Error in the end of code. Everything before that line is fine I check it several times. Bellow is the last line in code and bellow it is error that I receive after that line:

return pdfDoc.GetPDFAsByteArray();
at
O2S.Components.PDF4NET.Graphics.PDFBrush..ctor(PDFBrush
brush) at
O2S.Components.PDF4NET.Graphics.Shapes.PDFHTMLTextBox.boolean(Stream[code]....

View 1 Replies

Strange Characters After HTML Output

Feb 12, 2010

Recently I started a project and added a HTML file in it. I modified the HTML file and run it in Visual Studio to see the output. When I tried to validate the HTML file, I found some strange characters got appended. This is quite annoying, although I am not able to see those unexpected characters, I wonder what is the cause of the problem. I didn't adjust anything in control panel of the IIS server, I didn't modify the Web.config file. I tried to add another HTML file and put the same content into it, the same problem occured. Could someone tell me how should I troubleshoot the problem?

View 7 Replies

Strange Characters While Trimming String

Feb 21, 2011

using vb.net/asp.net 2005 and sql server 2005. I'm querying the database and returning text which I am then adding to a string. I'm creating a crystal report with the text however this is not a crystal report question, its about the string data. what I"m noticing is that when I show the string on the pdf that there are some strange characters at the end of the string. I am both trimming the string and taking out null characters however the strange text shows up like this:

strangeText>
SÙÇ
TÙçy|Ü
DÙÇ
$ÛÇ
</strangeText>

does anyone know what these characters are and how to get rid of them?

View 7 Replies

VS 2008 Strange Intellisense Error?

Mar 2, 2010

I have this strange error coming up in VS2008, where is says a variable in not declared in HTML view, when it clearly is declared in the codebehind:Can anyone help with why this might be happening? I've tried all sorts of things, even recreating the page from scratch, but this keeps coming up.

View 32 Replies

C# - How To Use Strange Characters In A Query String

Apr 14, 2010

I am using silverlight / ASP .NET and C#. What if I want to do this from silverlight for instance,

// I have left out the quotes to show you literally what the characters
// are that I want to use
string password = vtakyoj#"5
string encodedPassword = HttpUtility.UrlEncode(encryptedPassword, Encoding.UTF8);
// encoded password now = vtakyoj%23%225

URI uri = new URI("http://www.url.com/page.aspx@password=vtakyoj%23%225");

HttpPage.Window.Navigate(uri);

If I debug and look at the value of uri it shows up as this (we are still inside the silverlight app),

[URL]

So the %22 has become a quote for some reason.

If I then debug inside the page.aspx code (which of course is ASP .NET) the value of Request["password"] is actually this,

vtakyoj#"5

Which is the original value. How does that work? I would have thought that I would have to go,

HttpUtility.UrlDecode(Request["password"], Encoding.UTF8)

To get the original value.

View 2 Replies

AJAX :: Strange Results With MaskedEditExtender?

Oct 12, 2010

I've inherited a web project from another company, and I'm having a weird issue with a phone number mask.

If the ClearMaskOnLostFocus is "true", I lose the mask in the edit field (this is a editing screen for an existing record). If set to false, the mask is present, but the leading digit is truncated, and will write back to the DB an incorrect number if submitted, with that leading "_".

True = 8885551212
False=(_88)-555-1212
The DB field a a varchar(20) -- don't ask me why.
<asp:MaskedEditExtender ID="MaskedEditExtender3" runat="server"
learMaskOnLostFocus="true" MaskType="Number"
Enabled="True" Mask="(999) 999-9999"
TargetControlID="Phone_Number">
</asp:MaskedEditExtender>

I'm recently back at work after a long layoff period, and my ASP is a little rusty.

View 1 Replies

AJAX :: MaskedEditValidator / Strange Behaviour?

Dec 20, 2010

I am using the MaskedEditExtender and MaskedEditValidator, but have experienced some strange
behaviour. (See code example below). When entering a date into the textbox this is what I see:

1. The mask

2. Entering the date and time e.g. "19-01-1980 10:11:12"

3. When removing focus from the textbox the result is: "19-01-1980 19:01:19"

The six first digits of the date is copied as the time? If entering a day of the month larger than 23 and any given month, year and time (eg. 25-10-1980 12:12:12) the validation fails as the six first digits are copied to the time resulting in a time 25:10:19 which obviously is not valid.

I have downloaded the AJAX toolkit sample code and experience the exact same behaviour. When running the AJAX Toolkit samples from[URL] works fine!

Additinal info: Culture is danish (DateTime format is dd-MM-yyyy hh:mm:ss). Tried changing my systems culture to en-US but same behaviour.

Code:

[Code]....

View 5 Replies

ExtJs Grid Acting Very Strange

Oct 18, 2010

So I have two pictures of the weirdness that is occuring.As you can see in the picture above, the scroll bar on the right hand side is being cut off a little bit by the screen, and even when you scroll to the right, you don't get the bar back, it remains cut off.

Here is the other scenario:

Here, you can see that when I scroll down in this grid, the scroll bar kind of fits into the bottom of the grid and doesn't even go all the way down. You need to manually click into the grid and hit the down arrow to get the rest of the way down.

Edit: Here is the code to generate the grid (Ext created through VB controls):

Dim VehicleOptionsGrid As New Akcelerant.Framework.WebControls.Grids.Grid
With VehicleOptionsGrid
.ID = "VehicleOptionsGrid"[code].....

View 1 Replies

.net - Fix Strange Conversion From String.ToUpper() In C#?

Feb 1, 2011

I'm trying to show something like "contáctenos" in uppercase, but when I use the string.toUpper() method I have the strange result "CONTáCTENOS" instead of "CONTÁCTENOS". The page "culture" is set correctly to "es-ES" and the "uiculture" too.How can I obtain the correct result if it's possible, without using regex or replace.

View 2 Replies

Strange Error When Hovering Over A Menu Item?

Nov 3, 2010

Whenever I hove over any one of the menu items on my MasterPage, I get the following error: see attached image.I have no idea what is causing this and the filename on the tab appears to look as if it's a dynamically created page so I have NO idea how to debug it.

View 15 Replies

Web Forms :: Strange Characters Appearing Instead Of Entered

Jul 16, 2010

I have a web application that users insert some comments to the database. But when they try to Write some non-Ascii character to textbox some strange characters apperars instaed of my entered characters.For example When i write ı it appears like this Ä

View 1 Replies

Web Forms :: Strange Postback Arise When Using Application_BeginRequest?

Dec 15, 2010

I have a problem using Application_BeginRequest and I have absolutely no clue what is going on. When using this code, my website works fine:

[Code]....

Now, when I only alter it like this (note that I am actually doing nothing special):

[Code]....

This small change in code causes that forms don't postback anymore. I am truely clueless why this happens when trying to get some request.form variables.Stupid thing is, when debugging the website using visual studio, everything works fine.

View 8 Replies







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