I recently tried to create an ASP.Net server control. This server control should has at least two pages. One page for registration (Users can register) and one for asking questions. It is important to make it with ASP.Net Server Control.
The plan is to make this server control and web designers can easily drag and drop this server control into ASP.Net WebForms or MVCs and set properties like back-color or header image in properties tab. I wonder if its possible to have two pages in a server control dll file with all events, viewstates and properties.
Please some one tell me how to create a second page in a server control dll file? And another question is how to move between those pages?
As per my understanding you should go for MultiView or ASP:Wizard control ?
Maybe you are looking something like this from codeproject.
Related
In classic asp or asp.net you could create custom controls which would reside in the solution e.g customer control which could be used for customer's billing address and shipping address.
What i am trying to achieve is creating a website/iframe which could be hosted as a website or something and then the client applications would use this as an iframe in their application. The reason i want to do this is to have one central location for any changes and avoiding the need to recompile and redeploy existing applications whenever there is a change in control.
Is this possible to do? what would be the design like? any links to articles or similar solutions is highly appreciated.
Is it advisable to create a default page with content of custom control and then force the users/client app to consume that page in a iframe?
Thanks.
I have an ASP.NET custom server control that inherits from the Panel control. It adds its own JavaScript and styles to the page using ScriptManager. Now some users ask me if I can update it so they can use it in MVC. What can be done here? Any references, links, etc would be greatly appreciated.
What can be done here?
Sorry to disappoint you but a total rewrite and re-engineering is required. ASP.NET MVC is an entire different pattern than classic WebForms which relied on server side controls and (may God forbid) ScriptManagers. Depending on what this control is doing and the functionality it exposes there might be different ways to migrate it to MVC. One way would be to use custom Html helpers along with custom jQuery plugins.
I have a WinForms .NET component that can render and save JPG images. How can I make it work on my ASP.NET website each time a visitor requests a page?
Do I need write a web service?
Do I need to run a winforms app on the server and interact with it?
Do I need to host it on a separate ASP.NET page and query it to render and save new images?
Thanks.
EDIT: I am looking for a solution that doesn't need any control to be downloaded but simply a page refresh to display the new image.
Simple way to expose a .NET WinForm control as an ActiveX control in any HTML or aspx page
http://www.codeproject.com/KB/miscctrl/htmlwincontrol.aspx
Is it possible to create a .xaml (silverlight) control in a web application project?
I have an aspx application wherein I am using ajax controls and updatepanel. I want to create some silverlight controls in the same project, and load it along with my other pages/controls.
I am not sure if it is possible to create a silverlight control without having a dedicated silverlight project template.
I think your question is the same as one of mine: Is there a way to insert Silverlight XAML into my page using ASP.NET code-behind?
If so, the answer is basically "not in any sane way, but you can hack it by setting up different parameters (as in weiqure's answer) and using them to dynamically generate the XAML."
I'm not sure if this answers your question, but you can have a solution file that contains your web app and a Silverlight control. Then, to include the control in your web app, add it via the "Silverlight Applications" tab in the web app's project configuration. This will auto-update the .xap file in the web app's ClientBin folder.
Alternatively, you can create the Silverlight control in its own project/solution outside of the web app solution. Then you just need to copy in the .xap file to the web app's ClientBin and add it to your aspx page the usual way. I've found this approach useful when I want to deploy the same control to multiple web sites/projects.
Instead of creating several controls you might try creating one control that dynamically creates it's own content.
You can tell the control what to do by passing initialization parameters to it. Here's the MSDN tutorial and here's a blog post about it.
I think this approach is no worse than creating controls dynamically. You can probably send it XAML markup (I'm not sure if I remember that correctly, though), otherwise you could path something like "myButton=Type:System.Windows.Controls.Button;Content=Click me!" and then use reflection.
In my last job we ended up rewriting the complete ASP.NET stack (forms, controls, validation, postback handling, ajax library etc...) - the reason I was given was that the ASP.NET controls were not accessible enough, not were any of the third party controls that were assessed for the project.
Can anyone point me to good accessible ASP.NET controls that do ajax as well?
Failing that, how would you approach creating accessible, ajax enabled controls?
You could take a look at the 'App_Browsers' feature in .NET.
It gives you the opportunity to hook into the rendering engine for each control. The original intention for this was to be able to alter the HTML output of controls depending on the user's browser - but you can also do it for all browsers.
You could also take a look at these control adapters, which make the normal ASP.NET controls 'CSS Friendly'.