I am trying to disable a control this way:
YAHOO.Bubbling.fire("disableControl", {'formId':'nss_docs_list', 'fieldId' : "cm:description"})
But it doesn't work (and always returns false). Please tell me how to disable a controls on form properly?
Thank you!
Related
Can anybody help me of using tree_view control in asp.net ? I want to use this control without using database. Can anybody give me a sample of how to use it?
I've created a Windows Forms Application in C# which allows users to add controls to a TabPage which they can resize and reposition. Now I want to do the same thing only in ASP.NET.
I managed to add the controls dynamically following this tutorial. I use jQuery UI to make them resizable and draggable. The problem I encountered is that when I add a new control all the others are reverted to their initial position and dimension.
I assume I have to save their position and size and apply them to the newly created control on LoadViewState. Is there a way I can view this attributes from code-behind? I've managed to get these info using Javascript but I don't know how to get it into code-behind.
Can someone please point me in the right direction? Thanks in advance.
[EDIT]
Thank you for your answers. Here's the code:
HTML C#
You need to store the positions and dimensions of the controls and pass those values to the server when you click the add control button.
You have a few options of how to do this.
Query String
Hidden Form Fields (<input type="hidden">)
Hidden Text Box (hidden with style="display: none;")
You can use JavaScript to set these values, then apply the positions in your code behind after adding a new control.
I have never done this before and am very beginner in this one, so please treat me that way and help me. Obviously this is a complex topic for me at this stage.
I need to develop a custom data-bound control which will contain, few text-boxes, drop-down lists, labels, and other standard web-server controls. And, I want to be able to load this control from a web page on button click. When the user enters any data to any of its child controls, i should be able to save, and also retrieve when the data-bound control is loaded again. Also, the data in the child control should retain their value on postback.
Can someone help me getting into building this? What approach should i follow? Any books or artilces matching my requirement will be really helpful which i can read and help me develop this.
Here is an example of a custom data bound control: http://msdn.microsoft.com/en-us/library/ms366540.aspx
Just out of curiosity, using a FormView or DetailsView control wouldn't solve the problem you are experiencing? It has to be a custom control?
I have created UserControl that contains a textbox and a restricted length validator for that textbox.
I'm adding user controls dynamically via UpdatePanel to my Parent WebForm. And the problem is that Validator just won't work. It just won't trigger.
I work on .net 3.5.
Does anyone have any clue what is happening and how can I make this validator work.
I have face similar problem and my validator in the detailsview-->updatepanel-->Validator
Check this thread for details
On the Client Click I have enable validator using javascript function
ValidatorEnable(document.getElementById('<%=rfv.ClientID%>'), true);
I too faced such an issue. I was using .Net 3.0 and VS2005. I referred to this problem discussion and the solution and could solve my issue. You too can refer the same.
As far as I understand it you can't add controls dynamically as this changes the page structure and .net gets confused. Instead you have to have all controls loaded "onLoad" and then simply change their visible flag to show or hide them as needed.
This way .net can keep track of them all and is happy.
I am looking for a custom control which could enable me to call message of following type.
http://extjs.com/deploy/dev/examples/message-box/msg-box.html
Is there a control which function like a .NET desktop application messagebox?
I know, exactly similar may not be possible but main features I am looking for here is returning value of clicked button and custom value entered by user in code behind.
I have also started working on it myself, but hardly any luck so far.. any direction in this case will also be very useful.
There is a good tutorial which could help:
Create MessageBox user control using ASP.NET and CSS
And here combining it with the AjaxControlToolkit:
ASP.NET Popup Message Box User Control
I hope this helps!
Have you looked at the AJAX Toolkit? It doesn't do all the things you want, but it should be too hard to the extender and controls needed into a CustomControl and create your own DLL.
use the namespace "System.Windows.Forms" by adding the reference to the solution explorer