Is there any other alternative of usercontrol other than webpart and iframe, Which i can use in my asp.net application.
thanks in advance.
Don't know what you are trying to achieve but at the top of my head I can say you can use an update panel to act as a type of iframe to load another page inside your page.
User control is already as abstract as possible: it's final and ultimate goal is to send something to the browser, based on parameters you give it from the server side. Label has Text property that once set, send <span> tag to the browser with that given text. Panel has collection of children that when set are sent to the browser wrapped in <div> element. Etc Etc..
So the direct answer is: no, no alternative.
However, based on your comment, there might be a way to improve the performance.. what control you currently have? How user can customize them? If you can explain better the scenario and post some relevant code it would be great.
Considering your comment on the question, Using usercontrols along with placeholders and some jQuery plugins OR simply web parts controls as containers is fine.
No need to change it unless you have a problem with it. Then we might discuss other options like Custom Server controls etc.. but those also have their issues, etc.. so it's always a balance.
If you have no problem and want to check whether this is the right thing that you do or something else, then I think the answer is, yeah. Unless you have specific issues, this way seems OK to go.
Related
I'm not sure how to boil this question down into a sensible single-line title. I'm also new to .Net.
I want to build a web-page version of an invoice, but I want each page of the invoice to flow down the page, not be paginated. The header of each section will be the same, but the line items and the footer will be different.
I've done this before by writing html to a stringbuilder and then outputting it to a literal control, but I think there must be a better way. I'm just having a hard time conceptualizing how to do something like this with server controls because of the fact that the ID's need to be unique.
Can someone point me in the right direction here?
Thanks!
You can create custom control and give it some properties that you can modify how you want and add the same header and footer to the control. Then use it on your page how many times you would like. Check out tutorial here:
http://www.codeproject.com/Articles/87474/ASP-NET-Custom-Control
i need to create a block View with a search box attach to the header in order to search nodes for one specific content type. I don't know how to achieve this, so i ask for your help. Something like the attached photo.
I'm not exactly sure here, but it sounds to me like you want to:
Create a view;
add a "filter" which limits the view to only your desired content type;
add an "argument," and then expose this argument, for either title, body, or one of your text fields.
Unfortunately:
This alone will not search the whole node. If most of your content is in body, this would probably be a good way to do it. But, for example, if for some reason you have a title like "Bicycles in Timbuktu" with a body that does not contain the word "Timbuktu" - were your users to search for Timbuktu, this item would not appear. That said, it's probably a rather rare case, and if you are simply aiming for happy users, and not rigorous perfection, this will likely be enough.
That said, Kniganapolke's suggestion of checking out Custom Search is excellent. The advice here is more applicable if you want to do this as you've designated and using the power you have with Views (and the other possibilities they offer), rather than a more dedicated-type module. If you don't have other specifications which require you to use Views, I'd guess that Custom Search will likely be the better solution.
Have you tried Custom Search module?
If anybody is interested, i have edited the header block view and load a custom_search_block inside it.
Thanks anyway
create a view with the content you want and then filter it by content. Expose the filter.
http://beeznest.wordpress.com/2011/11/01/create-a-view-to-search-on-content-title-in-7-steps-in-drupal-7/
ASP.NET, web form model.
Is there any sample code/site that demonstrate a couple samples for regular website patterns/ templates? Like if I want to use tab to switch between different pages, should I put the code in a single page or in different page, and treat each tab as a page.
Or if in a search page (just a single search bar and button), should I display my result panel in same page using dynamically enable the result panel, or just to another page?
I want to find a general design pattern/ template. Please advise, thanks.
I don't know if this answer will be helpful to you or not. Correct me if I am wrong.
You are specifying demonstration about web designing. It seems the functionality you want is clearly saying to choose from weather you want to use AJAX or not. I suggest why don't you use jQuery Framework for all this functionality.
I would give this a read and consider what best fits your application and your programming style, no one size fits all with paterns.
http://msdn.microsoft.com/en-us/magazine/dd252940.aspx
After you have a general idea, head over to google.com and look for the patterns that catch your eye for simple tutorials
Edit:
For the specific question about whether you should modularize your code. The answer is almost always yes. If you think there is a chance that the component will be used somewhere else then doing this a head of time can save you a lot of headache later. This practice also makes maintaining a lot easier because it gives a clear scope of what could be causing a bug. Instead of having to look threw an entire page of unrelated code for things changing state unexpectedly in the page life cycle.
I'm creating an inbox system for my website which allows basic communication between users. I'm fetching the results with jquery calling a webservice.
Then I'm using a jquery template engine to render the results to the screen. So far this all works good. but now I want to add some click functions on certain parts of inbox messages. For example I want the title of the message to be clickable so it will expand/collapse the fulltext which is hidden in a div beneath it.
But I can't seem to use the jquery selectors on this dynamic json result. It works when I put the function in the href tag itself but I don't really want to. I also tried adding the function after the success function but no luck either. Is it possible at all to use selectors with a template engine?
I hope I made myself clear otherwise feel free to ask more information. Thank you very much
Kind regards,
Mark
Have you tried jquery .live option? http://api.jquery.com/live/
I'm sorry, you'll see it happens all the time, when something goes wrong and I ask a question the minute after it it solves itselves. It is indeed possible to use the jquery selector on dynamic elements. Just make sure u put it after the template processing and in the ajax success function.
Thanks.
Are you trying to select the json that is returned from the webservice or are you trying to use the jquery selector to find an element that you added previously on to the page?
I am working with ASP.net and I have two gridvew controls and some link buttons. Now, to bind these gridviews, I have to call web services and data access. Since I am pulling large amount of data, the page loads slow. I am wondering if there is a way I could do partial page load, meaning that I would like show the link buttons first then show rest of gridview as data are available (to bind to gridivews).
Is there a way I can accomplish this? (Preferably, without AJAX).
Thanks.
If you want a truly AJAX-less method, you could go with the ol' trusty IFrame tags and have your gridviews be stand alone pages. I believe the page will render around the IFrames while the IFrames themselves load.
NOTE: I also am not advocating this a the best solution, but it may meet the intent of this scenario.
Not without AJAX. But can you define what you mean by "without AJAX"?
Have you seen PageMethods? They may do what you intend, in a way that is palatable to you.
Alternately, you may mean "without UpdatePanels" in which case, are you familiar with XMLHttpRequests? (Note: I do not intend that an XHR is the appropriate solution here, I'm probing for familiarity with the topic)
First a couple of things, you may want to limit the data you are grabbing. If you are using a gridview this data will be stored in view state, causing huge overhead. If you are only displaying data, consider using repeater or datalists they are lighter. In any case you should be using pagination, though you may have to implement a custom pagination solution for the repeater.