Oct 20, 2010
With my model, I have one view model using another as its base. In my case, BaseUserModel is inherited by CreateUserModel, in order to share common properties such as Username and Password. My CreateUserModel adds to that by having ConfirmPassword, Email, SecurityQuestion, etc.
My problem is, when using the ValidationSummary() Html helper, the validation is obviously in order of the properties in my model. Basically, because of the inheritance I have going on here, the errors are not in the correct order.
Is it possible to control when or how these validation rules are added to the list? The only attribute I'm using is Required.
I have built a "portal" that displays "widgets" (server side usercontrols). The page contains two columns, each containing an updatepanel. Each widget contains an updatepanel and multiview with the default view showing a "loading" message and the second view contains the actual content.
When a user logs in, I query the database to get a list of widgets the user has access to, along with their column and order number. During page init, I add all of the widgets to the page's columns in the order indicated. Once the page loads, a timer on each widget gets fired and the widget's multiview switches from the "loading" view to the content view and sets the content's visibility to true. This forces the content to load.
Setting up the load this way makes the page load appear faster because it doesn't process any of the widget data until after the initial page load. This all works fine but I have an issue with the order in which the widgets get loaded.
Currently, the page loads and the widgets will start loading from the top of the left column down to the bottom, then it will start loading the top of the right column. The page could potentially have many widgets so I end up staring at a bunch of loading messages on the right side while I wait for the full left column to load. I would really like to be able to load top down across both columns instead of the whole left column and then the right column. For example, load the first widget in the left column, then the first in the right, and so on. This way, the user would have something to look at the top instead of staring at a bunch of loading messages and having to scroll down the page while it loads.
I have this import function which can be changed by the client in his desired way.Now I want to code such that if the client tries to import his own data on the page and doesnot give the tags in the order mentioned below his import function should be stopped.
It shouldn't make any changes unless the tags are in the right format because the problem now is if the tags are not in the right format when client changes then its importing over the existing files and directing to an error page which I dont want it should simply stop the import function if they are nt in the order.the code for this function is below
It is not feasible to use ScriptManager.RegisterClientScriptBlock because script is around 200 to 300 of lines and also not feasible to move it in another JS File and Use ScriptManager.RegisterClientScriptInclude since each page has different script with almost same numbers of line Is there any way so that i can use existing script with minimum number of steps with full reusability
Configuration : Windows Vista,VS 2005,Ajax v1.0.61025 My Html Page
But i am getting Sim is not defined. Error. post ur comments. I have reviewed most of the forums. I am not able to clear
I have a user control with both an UpdatePanel and a ScriptManager.
Some pages in the system have a ScriptManager of their own, and need to include the UserControl.
This throws the "You can only have 1 ScriptManager" exception.
If I remove UserControl's ScriptManager, I'll get 'UpdatePanel1 requires a Script Manager" exception.
I've tried to modify the UserControl to dynamically include it's own script manager if none exists. But all the methods I've used before involve adding a delegate to Page.OnInit-- which won't work, since the UserControl Init fires first.
Because the system designers here like making my life difficult, I can't create a MasterPage, or a BasePage for the system in inherit off of. I'd be stuck going to each page an adding a ScriptManager before the UserControl on each of them. Is there any way of, in the UserControl, detecting if the page has a ScriptManager, and if not, adding it dynamically in a way that makes the UpdatePanel happy?
I have a jQuery function in a .js file, and the function requires a querystring parameter to be passed. If I try to use the CompositeScript feature in the ScriptManager, it pukes on the file that has the querystring.
I m getting Problem in Tab Index Setting of Dynamic Created Controls. There are 6 Drop down dynamic created and also Two user controls which contains text boxes. There are also Static Controls on a Page. How i set tab index for all controls. I have try to give from code behind using TabIndex property But it's not working and Tab order get destory.
I want to implement readmore/less feature. i.e I will be having html content and I am going to show first few characters from that content and there will be a read more link in front of it. I am currently using this code :
var txtToHide= input.substring(length); var textToShow= input.substring(0, length); var html = textToShow+ '<span class="readmore"> … </span>' + ('<span class="readmore">' + txtToHide+ '</span>'); html = html + '<a id="read-more" title="More" href="#">More</a>';
Above input is the input string and length is the length of string to be displayed initially. There is an issue with this code, suppose if I want to strip 20 characters from this string:
"Hello <a href='#'>test</a> output", the html tags are coming between and it will mess up the page if strip it partially. What I want here is that if html tags are falling between the range it should cover the full tag i.e I need the output here to be "Hello <a href='#'>test</a>" . How can I do this?
My only concern with the above mentioned idea is that how do I render all my content while placing some code in the head tags?