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


Top 5 Contributors of the Month
david stephan
Post New Web Links

Resizing tab panel

Posted By:      Posted Date: September 16, 2010    Points: 0   Category :ASP.Net
 
In a tab container after clicking on the Search button a grid will be visible. Now if I change the tab the grid will not be visible. So for that  I made document.getElementById( '<%= dtgSearchresults.ClientID %>').style .visibility ='hidden'; Now what happen I cant resize the panel, the grid is not visible but the size of the page is not refreshed.  Means suppose on the pageload gridview is not visible so at that time size= 100px, when the grid is visible it become 130px and when i move to another tab and come back again on that tab the size is remain 130px though the grid is not visible. Please provide some example and need javascript function only because I made tabpanel property autopostback= false. 


View Complete Post


More Related Resource Links

Resizing Panel when adding controls

  
Hi,

I have a panel on a form and I am adding controls to it from code behind.

Code behind:
First I am creating TableLayoutPanel
in loop I am adding controls to TableLayoutPanel
and then adding TableLayoutPanel to panel.

problem is I have specified panel height = 100 in designer. how to make it grow when more rows (controls) added to TableLayoutPanel?

At the same time I want to move controls below the Panel to move down..

 .................
| Panel		  |  --> I want to make this auto size
| Other Control1  |
| Other Control2  |
| Other Control3  |
| Other Control3  |



I tried setting Autosize=true for Panel and it didn't help!!

How to position one control relative to another one even after resizing windows?

  

I used following Jquery code trying to make image close to a table. It worked fine after first load, but the position changed after window is resized. Any ideas? thanks

$(document).ready(function() {
            var pos = $("#mytable").offset();
            var width = $("#mytable").width();
            var left = pos.left + width + 20;
            var top = pos.top + 200;
            $("#ctl00_ContentPlaceHolder1_imgPreview").css({
                position: 'absolute',
                zIndex: 5000,
                left: left,
                top: top
            });
        });


OutOfMemory when resizing image

  

I've been pulling my hair out on this one. I have a image gallery module in asp.net. I'm using Telerik RadUpload to upload a sinlge image. I then save the image on the server and create a thumbnail and save it as well. There is no loop involved and is one at a time. It always seems to work when I run it locally on Windows 7 (IIS7) but on the server IIS6 I keep getting OutOfMemory errors. The images I'm trying are barely 1MB so not huge files. I've gone through google and bing over past several days and can't seem to find a solution. In my resize methods I'm using the "using" statement on the image reference, etc. I can pretty much always make it fail with the 3rd line below:

ruPhoto.UploadedFiles[0].SaveAs(Server.MapPath("~/DesktopModules/Gallery2/Photos/" + newPhotoName));
System.Drawing.Image photo = System.Drawing.Bitmap.FromFile(Server.MapPath("~/DesktopModules/Gallery2/Photos/" + newPhotoName));
//System.Drawing.Image img = new System.Drawing.Bitmap(photo); <--- will cause outofmemory error

if I just use the photo variable then the OutOfMemory will occur later in the resize code.

Any help would be greatly appreciated.


UserControl like asp:Panel

  

Is it possible to write own User Control with functionality like asp:Panel?


Dynamic Checkboxlist exception when adding to Panel when using Master Page

  

In essence, I am creating Dynamic Checkboxlist controls and adding them to a Panel.  It works well when I do not have a Master Page configure to this webpage. Once I have a masterpage congifured.. I get a "Object Reference not set to instance of object" error on the Panel_Control.Controls.Add(Checkboxlistnew) line:


protected void Page_PreInit(object sender, EventArgs e)
    {
       
        XML OXML = new XML();
        
        alistChkBoxLabels = OXML.XMLTransform("C:\\Documents and Settings\..\\Config_new.xml", "config_options/check_box/applications/app/@name");
        int count = 1;
        alistCheckisFacility = new ArrayList();
        alIDTracker = new ArrayList();
        while (count <= alistChkBoxLabels.Count)
        {

            Checkboxlistnew = new CheckBoxList();
            Checkboxlistnew.ID = count.ToString();
            alIDTracker.Add(Checkboxlistnew.ID);
            Checkboxlistnew.Items.Add(new ListItem(alistChkBoxLabels[count - 1].ToString(), alistChkBoxLabels[count - 1].ToString()));

            String sAppName = alistChkBoxLabels[count - 1].ToString().Trim();

            
            alistCheckisFacility = OXML.XMLTransform("C:\\Documents and Settings\\Administrator\\My Documents\\Visual Studio 2005\\WebSites\\User_Trial\\Config_new

Treeview problems in Update panel

  

Hi,

I tried using this code, on a Treeview inside an update panel, which is populated dynamically in code behind. 

However, it doesnt give me the required functionality.

Following is my aspx code for the TreeView and the TreeView populating logic:

 

<div id="treelist">
<asp:UpdatePanel ID="UpdatePanel1&quo

Accordion Control with Panel...Add an Update Panel?

  

I have an accordion control in my web site.  And in one of the panels, I have a drop down list box where, when the user selects an item, it updates the labels right below the ddlistbox.  I have it so that it maintains the scroll position when the ddlistbox has an autopostback, but it's very obvious that the whole page posts back.


My question is, can I/should I just enclose the ddlistbox and the labels (and a couple of text boxes) in an AJAX update panel?  I already have a ToolScriptManager (because of the accordion control), so I don't need to have another script manager, right?  I can just put the update panel (with the other controls inside of it) right in the accordion panel, right?  Then when the ddlistbox posts back it won't have the delay of the whole page posting back?  And it'll still execute the event handler for the listbox selection change?

Does this sound right?  I'm just looking to make the post back "invisible", and I would like to do a partial postback of just these few controls.

Thanks in advance! :)


update panel in content page

  

Hi,

iam using master page  and i am using update panel in content pages (child pages)

my questions is that can use updatepanel in every child page or  master page only.

give ur suggestions, i have senario , in a page i have file upload concept ,updatepanel

is not support that fileupload.





Allign a Panel to Bottom of a DIV

  

Hi All

Is it possible set the alignment of a Panel to the Bottom of a DIV?

Any examples would be appreciated

 

tia

Yuppski  


Checkbox will show panel based on selection without postback.. how to do

  

Hi..

I have Two Checkbox in my asp.net textbox..

First what i want is

based on two checkbox user has to be select any one only..

if checkbox1 is selected then Panel1 visible true without postback

if checkbox2 is selected then Panel2 visible true without postback


Wizard in an Update Panel

  

Hi everybody. Heres the deal. I have a three step Wizard with various textboxes in it. I out the Wizard inside an Update Panel and Content Template. I launch the site and the first step of the wizard is executed nicely but when I click next to get to the second step, nothing happen. If I take the wizard out of the update panel then it works fine.


Any help would be very much appreciated cause I am a bit new in ASP.NET.


Thanx a lot.


Trying to set update panel trigger programmatically

  

 I have a recursive sub that finds a dropdown list and sets up an AsyncPostbackTrigger for an update panel. I have tried calling this sub both from page_init and page_load 

If the dropdownlist is within the update panel, eveything works fine. If the dropdown list is not in the updatepanel I get error

A control with ID 'ddlPersonFilter' could not be found for the trigger in UpdatePanel 'up1'. In both cases the sub does find the dropdown list and executes the code to set up the trigger. Thanks for your help.

    Private Sub SetUpdatePanelTrigger(ByVal oControl As Control)
        For Each ctrl As Control In oControl.Controls
            If TypeOf ctrl Is DropDownList Then
                If CType(ctrl, DropDownList).ID = "ddlPersonFilter" Then
                    Dim thisddl As New DropDownList
                    Dim thistrigger As New AsyncPostBackTrigger
                    thisddl = ctrl
                    thistrigger.EventName = "SelectedIndexChanged"
                    thistrigger.ControlID = thisddl.ID
                    up1.Triggers.Add(thistrigger)
                    Exit Sub
                End If
            Else
                If ctrl.HasControls Then
                    SetUpdatePanelTrigger(ctrl)
                End If
            End If
        Next
 

Ajax Asyncfileupload doesn't work as soon as I put it in a control

  

Hi guys,

I can't get my <ajax:asyncfileupload> working and I don't see why...

When outside any panel or table it is working well, but as soon as I put it in a <asp:panel> or table I get a strange error which seems to be on client-side but I don't understand what's happen here. Here is the code and code-behind and Javascript.

Here's the error: 

http://screencast.com/t/Mjc0OWZi

Here's my front-code:

<%@ Page Language="VB" MasterPageFile="~/masterpages/mpSqueletton.master" AutoEventWireup="false" CodeFile="frmAdmGestSocietes.aspx.vb" Inherits="adm_frmAdmGestSocietes" title="Untitled Page" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajax" %>

<asp:Content ID="Content1" ContentPlaceHolderID="cphHead" Runat="Server">
<script type="text/javascript" language="javascript">    
        function uploadError(sender,args)
        {
          document.getElementById("<%= lblStatus.ClientID %>").innerText = args.get_fileName(), "<span style='color:red;'>" + args.get_errorMes

BDC + Document Information Panel Javascript Error

  

I hope someone here can shed some light on this one...

 

We have a document library configured with a few content types and document information panels for those items. Also on this list we have a BDC column setup to pull client names from MS CRM. This works fine on the list itself, however, in Word 2007 - the picker does not show up in the DIP, so we cannot easily select clients without knowing the name (first issue).

Secondly, if we enter in a client name, or partial, we recieve the following error:

"There was an error in the validation code" - with the following details:
Document Information Panel cannot complete this action, because of an error
in the form's code.
The following error occurred:

Object required
FileTongue Tiedcript.js
Line:171

Any help is appreciated!


Sharepoint list group by column data ,display in webcontrol like panel or label

  

I  have a sharepoint list[Managers] with groupby sector column. like below

1)Sector1
a)Dep1
b)Dep2

2)Sector2
a)Dep3

3)Sector3
a)Dep4
b)Dep4
c)Dep4

Each Sector group by column data i want to display in label or panel control.

How to do that ? how to write the logic?

REgards
mansoor

 


Regards, Mansoor

Problem with master page and update panel (I think)

  

Hello,

the app I am working with is made up of three nested master pages that have the following design:

The first master page ha only realize the HEADER, BODY and FOOTER divs.

The second one specialize the Body content placeholder and divide it in three more layers: NAVIGATOR, PAGE TITLE, BODY CONTENT.

The final layer specialize the BODY CONTENT in PAGE CONTENT and ACTIONS.

In one of my content pages I have (inside the PAGE CONTENT area) 

  • 1 Update Panel that contains a gridview object
  • 1 Update Panel that contains some HTML code to show in a PopupModalExtender

The PopupModalExtender can be either triggered from inside the gridView and also from a series of LinkButtons that are in the ACTIONS area.

The problem is that when the PopupModalExtender shows the FOOTER and the ACTIONS areas are not dimmed from the style I apply as background to the modal popup. An example of what I am trying to explain can be viewed in the following screenshot.

Why this is going to happen? Has anybody any suggestion on how to solve this problem?

Thanks a lot


changing records frm control in update panel

  

i have a list box, a command button and a grid

when i click a particular record / or multiple records on the  list box and then cclick the command button the records r transferred 2 the grid

i also have custom paging, the paging shld ocur as many times i clcik the command button

i have used updatepanel with the command button in it so that partial postback ocurs or there is no page flicker ,

but when i use update panel i get teh records in the grid but custom page is not working . it has no affect even if the records are added

if i remove update panel the paging works properly

how do i manage it with update panel


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