Hello Lee,
Though it is very simple but I want to clear it in context of DNN.
I want length of textbox if is 3 then attached with "-". Now for this what approch should follow.
1. Whether I should do it into backend code or client code. As I don't want to reload the form, simple I choose Client side scripting. I tried to add javascript into .ascx file but it is giving me error and GUI is not showing.
2. So is it ok if I add javascript through vb file. For this I tried popupScript As String
popupScript = "<script language='javascript'>function Test() {alert('Just to check'); }</script>"
Page.RegisterStartupScript("PopupScript", popupScript)
txtHomePhone.Attributes.Add("onKeyPress", "Test();")
It is working proper for above code and giving alert message on keypress event.
So my question is: Is it right approch or is there any other easy solution for this.
Thanking you,
Sandip
Dim