iSeller Commerce
iSeller POS Retail
iSeller POS F&B
iSeller POS Express
Crosslight
WebUI
ClientUI
What's New
Download Trial
Web Solution
Mobile Solution
Enterprise Solution
Custom Development
Blog
Community
Latest Development Blogs
ForumPostTopic
Browse By Tag
Hi,
I am creating my own control library(to be used in my web App) deriving from WebInput but i am facing lots of problem to do that.
I face lots of issue in javascript.
One of the thing is that, I want to create a NumericInput control to be used in App. Therefore i create my own "NumericInput" control deriving from WebInput.
Here is a sample code
using System;using System.Collections.Generic;using System.Linq;using System.Text;using ISNet.WebUI.WebControls;using System.Drawing;using System.Web.UI.WebControls;namespace dummyproj{ public class NumericInput : WebInput { CultureInfo.CultureName = "en-US"; DisplayFormat.IsEnabled = true; DisplayFormat.Format = "n"; DisplayFormat.Type = FormatType.Number; CalculatorEditor.IsEnabled = true; //NumericInput = true; base.OnLoad(e); }}
But when i use this control on my Web Application and try to type in any numeric keys i get some javascript error and doesn't allow me to type anything into textbox.
The only way i can type in is by using the Calculator editor of it.
Can you please provide the best way or any sample, which can show how to create your own control deriving from Intersoft components.
Thanks,
Huzefa
Hi Huzefa,
Please mind me if this is not what you are looking for. I have create an object in a class file derive from our WebInput. Then, in my aspx page, I am trying to load those object from that particular class. Also, all the property that are need can be added in those class file. I attached you a running simple sample that runs its scenario. Kindly notice me if this is not what are you looking for.
I hope it helps. Thank you and have a nice day.
Best Regards,
Andi Santoso
Thanks for your reply,
I am not getting one thing, Why have you treated 'NumericInput' as a Template.
Can't i just derive this 'NumericInput' class from WebInput and override my settings on events like OnInit and OnLoad?
I want my base to be Web Input only just few default setting i wan't to set in this numricInput class. So that my fellow developers don't have to understand this settings and are released from the burden of writing it again and again when ever they want to use this control.
The user who drags and drops this NumericInput control on to the form should get all the events and properties of WebInput control too.
My test show creating NumericInput derived from WebInput using the class below will not result in any javascript error:
public class NumericInput: WebInput{ public NumericInput(): base() { CultureInfo.CultureName = "en-US"; DisplayFormat.IsEnabled = true; DisplayFormat.Format = "n"; DisplayFormat.Type = FormatType.Number; CalculatorEditor.IsEnabled = true; NumericInput = true; }}
My colleague method using template will also works without any issue.
Thanx for the reply.
I am attaching a sample where in i have used your way of making the control and then used the control onto the page.
But this still throws the same javascript error.
Thank you
I have no issue on my end using the attached sample code. What is the javascript error you encounter? Have you tried using CommonLibrary instead of SmartWebResources to try to solve the issue? Which WebInput 4 and WebUIFramework 3 build are you using?
After few tests i found that this javascript error comes only in IE. On FireFox its works fine.
On Google Chrome i don't get anythin render onto the Page(don't know why).
The error that comes up is this "Member not found":
function anonymous(){//At this line i am getting 'Member not found' errorevent=event||window.event;}
I don't know why is it so. Even after this javascript error everything works good but i don't even want this error. As i dont wanna leave any errors onto the form, as you never know what may be become a bigger problem
How to use CommonLibarary instead of SmartWebResources and what is the difference. I am using your latest controls.
To use common Library, you will need to ensure that your project is run on localhost, not in File System. If you are in localhost, then you can simply include the ISNet.dll, ISNet.WebUI.dll, ISNet.WebUI.WebInput.dll and ensure that the common library is set as a virtual directory in your IIS.
Thank you.
My project is running on Asp.Net development environment so naturally it is on localhost. I have not hosted my application on IIS yet.
I don't know why i am facing this strange problem. Can you please help me in solving this problem.
If you would like to try CommonLibrary deployment, open your IIS Manager, add you project as an application (right click Default Web Site -> Add Application). You will also need to add the Intersoft common library folder (default location in C:\Program Files\Intersoft Solutions\WebUI Studio for ASP.NET\CommonLibrary ) as CommonLibrary virtual directory.
Have you used all the latest WebInput 4 and WebUI Framework 3 build? It is build 3 and build 752 respectively.
But why do i need to deploy it on IIS to solve this javascript error.
I think there is some small thing that we are over looking. All this things won't be required.
I checked this error is only on IE, Firefox working good.
Is my sample application giving error on IE at your side?
Yes, I have all the latest components.
I have tried your sample, and the result was fine in my end. I attached you my sample which basically almost same like yours but the different is, I summoned them from server side. As well as the image of screenshot of the result which has no JavaScript error persisted is included.
I hope it helps. Thank you.
or
Choose this if you're already a member of Intersoft Community Forum. You can link your OpenID account to your existing Intersoft Social ID.
Choose this if you don't have an Intersoft account yet. Your authenticated OpenID will be automatically linked to your new Intersoft account.
Enter your Wordpress Blogname