.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
MarieAdela
Imran Ghani
   

 


panel problem with opera,safari and chrome

  

Hi,

I have an update panel on a form with two panels inside,one of them is hidden on pageload,there are divs inside panels and inside the hidden div there's an iframe. By clicking linkbutton the visible div become hidden and hidden become visible.At Internet Explorer and Firefox,there's no problem but at Chrome,Safari and Opera the second div that become visible by clicking linkbutton is not shown properly,it's sliding to right. I tried all possibilities about positioning at css for second div.Absolute,relative,fixed but none of them worked,i also tried without positioning but nothing changed. Is there any idea ? Thank you


[Problem] MVC DropDownList Cascading Partial View

  

Hi, i'm trying to implement a cascading dropdownlist inside a partial view.

this is the code:

js function


function dropDownListCascade() {
    $('#idTipoAntecedente').change(function () {
        $.ajaxSetup({ cache: false });
        var selectedItem = $(this).val();
        if (selectedItem == "" || selectedItem == 0) {
            $("#idAntecedente").attr('disabled', 'enabled');

GridView EditItemTemplate DropDownList Problem

  

I'm creating a GridView that displays the details of an order.  One of the columns shows which Location the order went to.  All the information is correctly displayed and is based on a single SQL query (SqlDataSource1). 

When they edit the item, I have another SQL query (SqlDataSource2)  that correctly pulls a list of all the customer's locations and populates a DropDownList.  The issue I'm having is trying to set the SelectedValue of the DropDownList to the Location value, which is pulled in the first SQL query.

Here's what I've been working with so far... 

<asp:TemplateField>
   <ItemTemplate

GridView EditItemTemplate DropDownList Problem

  

I'm creating a GridView that displays the details of an order.  One of the columns shows which Location the order went to.  All the information is correctly displayed and is based on a single SQL query (SqlDataSource1). 

When they edit the item, I have another SQL query (SqlDataSource2)  that correctly pulls a list of all the customer's locations and populates a DropDownList.  The issue I'm having is trying to set the SelectedValue of the DropDownList to the Location value, which is pulled in the first SQL query.

Here's what I've been working with so far... 

<asp:TemplateField>
   <ItemTemplate

Performance issue with IE8, no problem with Chrome 8

  

Hello,

I have designed a custom server control. It involve handling a large html table and a lot of dropdown lists with javascript. Everything works fine except I have a real performance issue with IE8: The page takes 10.1 seconds to be displayed completely with IE8 while it takes only 0.8 seconds when using Chrome 8 ! This is the exact same page delivered by the same server on the same computer. Only the browser change.

My question is: How can I profile the javascript execution ? I would like to find out what is taking so much time in IE8 and see if I cannot optimize that code. I really would like to have IE8 load the page as fast as Chrome is able to do.

I'm using VS2008.

Thanks for your advice.


Post New Web Links

dropdownlist - css - problem chrome

Posted By:      Posted Date: September 20, 2010    Points: 0   Category :ASP.Net
 

<div>
      <span>
          <asp:Label ID="Label18" runat="server" Text="Vrsta kreditne kartice"></asp:Label></span><span
class="formw"><asp:DropDownList ID="DropDownList2" Selected="True" width="200px" runat="server">
              <asp:ListItem>Visa</asp:ListItem>
              <asp:ListItem>MasterCard</asp:ListItem>
              <asp:ListItem>Diners Club Card</asp:ListItem>
              </asp:DropDownList>
          </span>
    </div>


div.row {
  clear: both;
  padding-top: 5px;
  }

div.row span.label {
  float: left;
  width: 175px;
  text-align: left;
  color:White;
  }

div.row span.formw {
  float: left;
  width: 500px;
  text-align: left;
/*  margin:0 0 0 10px;*/

  } 

I have a


View Complete Post


More Related Resource Links

styling dropdownlist problem

  

Dear All,

im facing a problem while styling my ddl, what i did is:

<div><asp ropDownList ID="DropDownList1" runat="server" style="background-color:Transparent;" Width="100%">
    </asp: dropDownList></div>

<div class="stlGradient">
<asp ropDownList ID="DropDownList1" runat="server" style="background-color:Transparent;border:none;" Width="100%"></asp: dropDownList>
</div>

the DIV style is having a bg image repeated X.

now this worked on Firefox
on google Chrome: the border gone but the background still white
on IE 7: nothing happend

thanks for helping.


Weird problem in Detailsview - Dropdownlist in

  

Hi,

I'm new in this forum and I really hope you'll be able to help me.

I converted a field in the detailsview into a template field and put a dropdownlist in the <InsertItemTemplate> and it worked great. This is the code I put:

<InsertItemTemplate><asp:DropDownList runat="server" DataSourceID="sdsGenresPossible" DataTextField="Genre"  DataValueField="Index" SelectedValue='<%# Bind("Genre") %>' ></asp:DropDownList></InsertItemTemplate>


Now, I tried to do the same thing for the <EditItemTemplate> . This is the code I put there:

<EditItemTemplate><asp:DropDownList runat="server" DataSourceID="sdsGenresPossible" DataTextField="Genre" DataValueField="Index" SelectedValue='<%# Bind("Genre") %>' ></asp:DropDownList></EditItemTemplate>  

When I change the DV properties I do see that a dropdownlist was  added but when I run the program and click on "Edit" in the DV nothing happens (however when I click on "Insert" it works fine).

This is the Select command for the data source I used:

<asp:SqlDataSource runat="server"
          

Autocompleteextender problem in google chrome

  
Hi, I've used autocompleteextender inside a repeater control. On OnClientItemSelected event of autocompleteextender i am setting some hidden field value to use it on server. The code is working fine in all browsers except google chrome. Actually when i traced the code, event is occuring and hidden field is getting value set but the hidden field value is not appearing on the server. On the server i got empty hidden field.  

ASP.Net MVC Dropdownlist and selected value problem

  
I was able to create a dropdownlist for my MVC project, but the value is not selected as  selected value on the dropdownlist. It just shows whole county list from the first.The value is from database. I tried find it from previous post, but it was quite confusing. Please, suggest me for any idea. Controller Code public ActionResult Edit(int i) {      var items = new SelectList(db.MST_COUNTRies.ToList(), "COUNTRY_ID", "COUNTRY_NM");      ViewData["MST_COUNTRies"] = items; } View Code <p>     <%= Html.DropDownList("COUNTRY_ID", (SelectList)ViewData["MST_COUNTRies"])%> </P>I was able to create a dropdownlist for my MVC project, but the value is not selected as  selected value on the dropdownlist. It just shows whole county list from the first.The value is from database. I tried find it from previous post, but it was quite confusing. Please, suggest me for any idea.Controller Codepublic ActionResult Edit(int i){     var items = new SelectList(db.MST_COUNTRies.ToList(), "COUNTRY_ID", "COUNTRY_NM");     ViewData["MST_COUNTRies"] = items;}View Code<p>    <%= Html.DropDownList("COUNTRY_ID", (SelectList)ViewData["MST_COUNTRies"])%></P>

Response.Redirect problem in Google Chrome

  
I'm building an ASP.NET 3.5 webapplication using VB.NET, and I'm having problems redirecting to another URL when using Google Chrome. Other browsers like IE and Firefox are fine.My data entry forms all have an OK and an Cancel button, which are both handled server-side. The Cancel button just redirects back to the originating page, while the OK button will add or update a database record and then redirect to the originating page.The redirect to the originating page is done by calling the following shared sub on a general utilities class in my appication: Shared Sub Redirect(ByVal p_sURL As String) Dim l_sURL As String = p_sURL.ToLower If Left(l_sURL, 1) = "~" Then Dim l_oControl As New System.Web.UI.Control l_sURL = l_oControl.ResolveUrl(l_sURL) End If If Left(l_sURL, 1) <> "/" Then If Left(l_sURL, 7) <> "http://" AndAlso Left(l_sURL, 8) <> "https://" Then l_sURL = HttpContext.Current.Request.Url.GetLeftPart(UriPartial.Authority) & wsUtils.SiteRoot & l_sURL End If End If HttpContext.Current.Response.Redirect(l_sURL) 'HttpContext.Current.Response.Redirect(l_sURL, False) End Sub As you can see, I've tried using the extra argument in the Response.Redirect call, but that

Problem Binding DropdownList in a gridView to a datasource

  
I have a Dropdownlist in an itemTemplate in a gridview. My gridView binds to dataTable1 (from which the selected value for dropdown comes from) and dropDown binds to dataTable2 (i need to get DataValueField and DataTextField from here).<asp:TemplateField HeaderText="Category"> <ItemTemplate> <asp:DropDownList ID="Cat" runat="server" SelectedValue='<%#Bind("CATEGORY") %>' > </asp:DropDownList> </ItemTemplate> <FooterStyle BorderStyle="None" /> <HeaderStyle BorderStyle="None" /> <ItemStyle BorderStyle="None" /> </asp:TemplateField>How do I do that? thanks in advance!

Problem binding data to DropDownList in DetailsView

  
Hi guys. I have a slight issue I awas trying to fix for 2-3 days, but nothing I try works. The scenario: DetailsView control in edit mode, I pass parameters to the SqlDataSourceProducts (edit.aspx?id=2) and the data source selects the appropriate data and fills in the DetailsView form. Except two drop down lists. These two DDLs (DDL2 and DDL3) are dependent on the previous DDL (DDL1) in the DetailsView. Thanks to PeteNet, when the selected value of the DDL1 changes, DDL2 and 3 change their lists and get bound to the database. The problem is: when I edit something from the database, DDL2 and 3 appear empty and when I update any other field and leave these, they get blanked in the database.  My goal is to set the selected value of DDL2 and 3 to the values in the database WHERE ID = QueryStringField="id". I can go for not binding the data unless the field is changed, but does not sound professional and user friendly. code: The SqlDataSource used to select the parameters from the table and populate the DetailsView <asp:SqlDataSource ID="SqlDataSourceProduct" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>" SelectCommand="SELECT ID, wm_number, upc, check_digit, unit, price_unit, brand, category, shelves, type, cooking, storage, packaging, origin, nutriti

dropdownlist selected value problem

  
i have dropdownlist<%= Html.DropDownListFor(model => model.SchoolDistrict,Model.sSchoolDistrict) %>To Poulate this value i have below code in controllerslist = new SelectList(list, "ID", "Name", selected);but what ever selected value i pass didnot shown in ddl

Postback Problem using Lightbox with DropDownList

  

Hi all,

I have two sites: "Default.aspx" and "mySubsite.aspx". In "Default.aspx" I have a hyperlink to open a lightbox window, which works perfectly.

Here is the code for it:

<asp:UpdatePanel ID="UpdatePanel1" runat="server"> 
<ContentTemplate>
<a href="mySubsite.aspx" class="lbOn">Open Lightbox Window</a>
</ContentTemplate>
</asp:UpdatePanel>


When the lightbox window opens("mySubsite.aspx.cs") I placed two drop down lists ( parent child use) . First DDL contains all the parent names and the second DDL returns the subname to the corresponding parent name. So basically I select a parent item and get the right subname for it.

Code for it looks this way.

protected void Page_Load(object sender, EventArgs e)
{

if (!IsPostBack)
{
DDLParent.DataSource = data_string;
DDLParent.DataBind();
}

}

protected void DDLParent_SelectedIndexChanged(object sender, EventArgs e)

Dropdownlist problem

  

I have a dropdownlist and a method to handle its selectedIndexChanged event.  When I change the dropdown's selected index and click on a submit button, the selectedIndexChanged event fires as expected.  If I click the again a same selected item second time, the event doesn't fire.

 

what what was reason I am not getting.. almost 5 hrs spend .. different diffrent ways likse set to selected index set 0 etc.. still it's not getting.

 

Pls give answers quick


Gridview Dropdownlist databinding problem

  

I am using gridview, in ItemTemplate  I am using dropdownlist which has the hard-coded value, I want to get updated value of dropdownlist from database, but whenever I use EVAL, it throws the following error:


 'ddl' has a SelectedValue which is invalid because it does not exist in the list of items.

Parameter name: value


I am using the following code:

<asp:TemplateField HeaderText="Status"  >
                  <ItemTemplate>
                      <asp:DropDownList ID="ddl" runat="server" SelectedValue='<%# Bind("Status")%>' >
      

event.keyCode problem in Firefox and chrome

  

Following code is working in IE but not in Firefox and chorme

TextBox1.Attributes.Add("onkeydown", "if(event.which || event.keyCode){if ((event.which == 13) || (event.keyCode == 13)) {document.getElementById('"+Button1.UniqueID+"').click();return false;}} else {return true}; "); 

Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend