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

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

Control positions in the Form are changed automatically.

Posted By:      Posted Date: September 18, 2010    Points: 0   Category :Windows Application
Hi All, I am developing an UI Form which is having many text, label, combo box controls.  As i have many controls to be placed in the screen, so the form is exceeding one page and i need to scroll. Problem i am facing here is, when every i execute the form all the controls are relatively moved down wards by leaving a blank space on top.   Please help me how to come out of this problem, and i am very much new to C# UI development.   Thank you in Advance.

View Complete Post

More Related Resource Links

output cache to be used only when parameter has changed + old question of user control not answered



i have 2 questions about output cache:

1.is it just me , or does it seems that it is used only after the second time that the user reaches the webpage? if so, why, and how can i tweak it to my needs? my guess is that it wouldn't be logical to cache every time a user reach a webpage, but only when it happens enough times.

2.i know that i can use "varybyparam" for using the output cache when the parameter doesn't change , but it seems that it would use the output cache even if there is no parameter , or if the specified paramter is not there. is there a way to overcome this?

3.an old question that somehow marked as "answered" , yet i didn't solve : suppose i created a user control and i gave it values through the CTOR via the aspx file . is it possible to show the values from within the split/design mode? remember that i've talking about ASP.NET and not simply C# winforms . i write this because this question was on :


and the answer that i got was for C# and winforms . i've tried to do the same for ASP.NET , but i've failed.

can anyone please help me?

How I disable vertical scroll bar of report viewer control on Web Form.


I'm displaying .rdlc report file using Report viewer control on Webform. If  I Fix height of viewer control and data is not same as to size of viewer control then it display one scrollbar on viewer control and second vertical scroll bar is coming on webpage.

 I want to off viewer vertical scrollbar or in simple word's I don't want to display two scroll bar with my report. Please guide me or send me reference if any.


Automatically populating Contact Selector not working in Form Services

Hi,I'm currently working on a form where i wan't to automatically populate a contact selector control with a users manager. I've got the managers userid, called the ResolvePrincipal webservice provided by sharpoint, and set all the values in the contact selector with the correct values. When previewing it works perfectly however when i move the form to Form Services it won't work.I've tried setting it via rules: i.e. on the change of a textbox write the manager values to the contact selector.I've tried setting the default values of the contact selector to fields where i write the manager values.I've tried setting it through code i.e. SelectSingleNode() and SetValue() for each of the fields in the contact selector.All of which work fine in preview mode but will not work in Form Services, UNLESS the contact selector already has a user in it. So if the contact selector is blank it won't work, however as soon as i manually select a user then try using any of the previously mentioned methods of setting the control it works. While using code i get a nullreferenceexception which leads me to think that possibly when theres no user in the control the xml nodes representing the AccountId, DisplayName, AccountType don't exit???? TO throw another spanner in the works, on the very odd occasion it will work in Form Services as expected, after celebrating and trying again it returns

User control or sub-form inside tab-pages? Best practice?

I've got a Windows Forms application with numerous tab-pages within a tab-control. Each tab-page is a diffirent user entry form with different controls of varying types. As the application is fairly large it is important that more than one developer can work on it simultaneously. Thus we decided to create a form for each tab so that different developers could work on different forms at the same time without overwriting each other's code. Each of these "sub-forms" are then assigned its relevant container tab-page as its parent. This works well but I was wondering if this is good practice or not, after another colleague commented that we are making forms look like user controls and that we should rather be creating a user control for each tab. I've converted two of the forms to user controls with relative ease and it does work nicely as well but with one draw back. On the main parent form, e.g. frmMain, where the tab control lives, there is one single button the clear the current display. When you click "Clear display" it clears various others items displayed on the main from, finds the current selected tab and clears its contents. The latter is easy to do with sub forms as I can simply close and dispose the sub form inside the selected tab, and load a new instance. I don't have to write custom logic to go and reset/clear each control on that form. Thi

Accessing data in a dymaic form control.

I have a page that will generate upto 10 copies of some web controlls, depending on how many the user wants, but I am not sure on how to access the data the user enters into it. The code  I have is: protected void ddlAmountToAdd_SelectedIndexChanged(object sender, EventArgs e) { //Create a for loop to generate and add all the form fields then add them to the pannel for (byte i = 2; i <= Convert.ToByte(ddlAmountToAdd.SelectedValue); i++) { Label lblGameName = DynamicControlCreator.Label("lblGameName" + i, "Game Name: "); TextBox tbGameName = DynamicControlCreator.TextBox("tbGameName" + i); Label lblReleaseDate = DynamicControlCreator.Label("lblReleaseDate" + i, " Release Date (MM/DD/YYYY): "); TextBox tbReleaseDate = DynamicControlCreator.TextBox("tbReleaseDate" + i); Label lblRegion = DynamicControlCreator.Label("lblRegion" + i, " Region: "); DropDownList ddlRegion = DynamicControlCreator.DropDownList("ddlRegion" + i, Regions); Label lblRegionOther = DynamicControlCreator.Label("lblOtherRegion" + i, " Other: "); TextBox tbRegionOther = DynamicControlCreator.TextBox("tbOtherRegion" + i); Labe

Using a form to control another form WPF

Hi, I am making a wpf web browser!,, i have a fav button that opens up a small window that has the combo box with the list of favorites in. When the user clicks the ok button i want the webBrowser on the other form to load whatever they clicked. Its much simpler in vb because i use: form1.webBrowser1.navigate("http://www.bla-bla-bla.com") Thats all i want to do but it has become a problem! i have tried this way thinking it would work: form1 form = new form1(); if(comboBox1.text = "bla-bla-bla") { form.webBrowser1.navigate(http://www.bla-bla-bla.com); } Please help, lee

How to access ServerSide control Value in Javascript changed by Ajax

Hello,I have a Textbox whose value is been changed using ServerSide code (AJAX based - Partial postback) and now I want to access that changed value in JavaScript. Please suggest me that how can I access that value.document.getElementByID is displaying old value.Things work fine with full postback but are creating above issue with Partial Postback.Thanks, in Advance....

Populate Form Control from xml File -- Easy way--please

Hi All,Is there any easy way to populate control on .net page using xml file? I have below xml file and i need to generate control accordingly using VB language. <dive id="div1" title="genera information" > <fieldgroup id="iduser" title="User Information"> <field id="txtusername" title="UserName" type="Text" maxval="14"> </field> <field id="txtpws" title="passwprd" type="Text" maxval="14"> </fieldgroup> <fieldgroup id="pinfo" title="Personal Info"> <field id="idsex" title="Select Sex" type="Choice"> <option id="1" value="Male"></option> <option id="2" value="Female"></option> <option id="3" value="Other"></option> </field> <field id="idcomb" title="Country" type="Combo"> <option id="1" value="China"></option> <option id="2" value="India"></option> <option id="3" value="Nepal"></op

accessing form view binded control from child control

I am using a form view control which has two binded textbox. Now at this level it works fine and the textboxes show the values from database. But when i insert a panel inside the form view and move these two textboxes inside the panel, they dont show any values. What could be the reason for this? Thanks!

Loop through all form Control

Hi All,I am looking some code in VB for my asp.net to get all form control's value with their ID. I have created more than 20 dynamically control as textbox, dropdownlist, checkbox etc... and the ID is not fix.Thank You

Find a form control that is created after postback

HiI have a drop down list (created during form design) with auto postback enabled. And I use AJAX to prevent 'visible postback'. When a user choose an item from the drop down list, the system will then perform a postback and created a set of form control's such as label, drop down list and text box for entry.Then, I will have a button (created during form design), and when I click on the button, i want to find for the form control that are created after the post back, but I cant find them!I wonder if those form controls are render to the web form?? But I have no problem finding the drop down list that is created during design time.Anyway I can find those form controls?Thank You.

windows form control library error in asp.net

Can some tell me what is this problem?my windows form control library have the drag and drop.when i open in web, the below error pop out.

How to enable own shortcut within WebBrowser control in Windows form application




I am developing a windows form application with C#, where I have placed WebBrowser control... I load some web page in this webbrowser and I need to know, that after I press my own certain shortcut that it will allow me to call my handler...

It should work something like this => I have certain textbox on web page and after pressing my own shortcut, it will call my handler which will automatically type certain text (which will be prepared in that handler) into that textbox... 

Could you advice me, how to make this happen or if it is even possible?


Thanks a lot in advance

Problem hosting a WPF user control in a windows form application

I have a windows forms application and want to to use WPF inside this application. So I have add a WPF user control into my project. Then I take a ElementHost from the toolbox and put it on my windows forms. The problem is now, when I want to add the WPF control with "Edit Host Content" I get the message "This ElementHost is currently not hosting any editable content....." What's wrong? How can I embed my implemented WPF control into the ElementHost ?

Why does ajax control not move onto form



Been following help video "Get Started with the ASP.NET AJAX Control Toolkit?" and I got as far as adding a Control from the Ajax toolbox but for some reason the control will not add to the form.

Anyone explain as to why might be.


How to pass value from browser into embedded windows form control library


Hi all,

i have one project which i embed the windows form control library inside the web form.

now i wanna pass a url from aspx into my windows form control library.

May i know how to do this?


how to set a value inside an Infopath form task control ?


Hi ,

how can I set a value inside an Infopath form task control ?

i used the following code but it's not working i don't know why

RequestSubmitted_TaskProperties.ExtendedProperties["TxtValue"] = "My Value";

so please advice



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