|
Thanks for the link. Iam using Sqlexpress for now and my code is in VB.Net and ASP.Net. Will this link still apply.
-- modified at 8:23 Tuesday 1st August, 2006
|
|
|
|
|
This example is there in VB.Net:
http://www.atalasoft.com/kb/article.aspx?id=10018
Best Regards,
Apurva Kaushal
|
|
|
|
|
Thanks for all your help Apurva, I will try all this when I am on my own computer.
Kind regards,
Ian
|
|
|
|
|
always welcome...
Best Regards,
Apurva Kaushal
|
|
|
|
|
Hello All,
I am creating a custom control which has a capability to create controls as requested. It means, if I ask custom control to create one textbox and two dropdowns, at runtime it will create those and show.
Now I would like to have cascading dropdowns in custom control. Do anyone have an idea how to add a cascading dropdown [ATALAS TOOLKIT CONTROL] from code at runtime?
Any help appreciated.
Thanks in advance.
- ashish
|
|
|
|
|
I have a problem with CustomValidator. I want to validate 2 controls. IsValid=false when DropDownlist selected item (some value) and some textbox.text ="". I don't know how to write clientValidation script ( no javascript, no vbscript language experience ). Please help
StonePit
|
|
|
|
|
just add the custom validator to your page and set its ClientValidationFunction function to the name of a javascript function that will do the validation. You don't have to set its 'controltovalidate' property as you will be interogating 2 controls.
Put a section in the header of your page that defines the function you just referenced. In this function, use the DHTML DOM to grab the elements you are interested in and interogate them.
your javascript function would look something like:
function CustomClientValidate(source, arguments)
{
ddl_Items = document.getElementById('ddl_Items'); //note the string in getElem.. must match the clientid of your asp.net dropdown.
or
txt_myentryfield = document.getElementById('txt_myentryfield');
and then something like
arguments.IsValid=true
var itemSelected = false;
for (n = 0; !itemSelected && n < ddl_Items.items.count; n++)
if (ddl_Items.items[n].selected)
itemSelected = true;
if (txt_myentryfield.value == '' && !itemSelected)
arguments.IsValid=false;
}
I did not try to run any of this and I may not be remembering how to iterate the items in the drop down on the client (a select on the client), but you can look that up elsewhere. This is the generate idea.
|
|
|
|
|
Hi,
I have to draw a pie chart using webchart dll in asp.net.
I have two records with colA, colB. I have to plot colA vs colB. All the 4 values should be shown explicitly. (4 distinct pieces).
Can anybody help?
Thanks in advance.
Swaroop.
|
|
|
|
|
Hi,
Thanks Guffa for your suggestion, ("<[^>]+?>") this expression works fine, but still i need your suggestion how to to filter the tags leaving bold,itallic,underline tags??? i tried in your expression as ("<[^< b >>]+?>") perfectly, it works for bold, when i tried for ("<[^< u >>]+?>"),("<[^< i >>]+?>"), they does not works for certain tag but it leaves the < i > or < u > tag as i need.
(Plz avoid the spaces between the tags), to avoid confusion i put like that
Plz suggest me
Regards
Exelio
-- modified at 5:23 Tuesday 1st August, 2006
|
|
|
|
|
Continue in the same thread.
---
b { font-weight: normal; }
|
|
|
|
|
on page load i have to bind a datalist control in another datalist control.
|
|
|
|
|
In the page load you bind the first datalist and in the itemdatabound event of the parent datalist you bind the child datalist.
Best Regards,
Apurva Kaushal
|
|
|
|
|
Hi Apurva,
thanks a lot ! The help worked out..!
To give the detail of the problem i have two tables ,Master and the Detail table.
I have to bind the Detail table in the inner datalist control.
Could you please guide me how to create relation with in the datalist controls?
|
|
|
|
|
Actually what you need to do is put the child datalist in the itemtemplate of the parent datalist and then as i told first bind the parent datalist and then on itemdatabound event of the parent datalist you first find the child datalist and then bind it. onitemdatabounf event fires for each and every record of the datalist and there you can get the associated child records for the parent ID. you can use filter for that.
Best Regards,
Apurva Kaushal
|
|
|
|
|
Thanks Apurva!!
This is what is was looking for ..
Regards
Deepak
|
|
|
|
|
always welcome...
Best Regards,
Apurva Kaushal
|
|
|
|
|
how can i check the string that it has at least "@" sign
for example .......@hotmail.com
i must check that string starting with some text but must end with "@hotmail.com"
|
|
|
|
|
try with
int a = (string).IndexOf("@");
and check the value of a
MHF
|
|
|
|
|
Hi,
By using regular expression you can able to do it.
Just go through the below coading:
<asp:regularexpressionvalidator id="regexpName" runat="server"
="" errormessage="This expression does not validate." controltovalidate="txtName" validationexpression="^([0-9a-zA-Z]([-.\w]*[0-9a-zA-Z])*@([0-9a-zA-Z][-\w]*[0-9a-zA-Z]\.)+[a-zA-Z]{2,9})$">
For more details just visit this site:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnpag2/html/PAGHT000001.asp
Regards
Exelio
|
|
|
|
|
the best way to do email validation is by using java script.
Just cut and paste the following java script. it will work fine.
<html>
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
function emailCheck (emailStr) {
var checkTLD=1;
var
knownDomsPat=/^(com|net|org|edu|int|mil|gov|arpa|biz|aero|name|coop|in
fo|pro|museum)$/;
var emailPat=/^(.+)@(.+)$/;
var specialChars="\\(\\)><@,;:\\\\\\\"\\.\\[\\]";
var validChars="\[^\\s" + specialChars + "\]";
var quotedUser="(\"[^\"]*\")";
var ipDomainPat=/^\[(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\]$/;
var atom=validChars + '+';
var word="(" + atom + "|" + quotedUser + ")";
var userPat=new RegExp("^" + word + "(\\." + word + ")*$");
var domainPat=new RegExp("^" + atom + "(\\." + atom +")*$");
var matchArray=emailStr.match(emailPat);
if (matchArray==null) {
alert("Email address seems incorrect (check @ and .'s)");
return false;
}
var user=matchArray[1];
var domain=matchArray[2];
for (i=0; i<user.length; i++) {
if (user.charCodeAt(i)>127) {
alert("Ths username contains invalid characters.");
return false;
}
}
for (i=0; i<domain.length; i++) {
if (domain.charCodeAt(i)>127) {
alert("Ths domain name contains invalid characters.");
return false;
}
}
if (user.match(userPat)==null) {
alert("The username doesn't seem to be valid.");
return false;
}
var IPArray=domain.match(ipDomainPat);
if (IPArray!=null) {
for (var i=1;i<=4;i++) {
if (IPArray[i]>255) {
alert("Destination IP address is invalid!");
return false;
}
}
return true;
}
var atomPat=new RegExp("^" + atom + "$");
var domArr=domain.split(".");
var len=domArr.length;
for (i=0;i<len;i++) {
if (domArr[i].search(atomPat)==-1) {
alert("The domain name does not seem to be valid.");
return false;
}
}
if (checkTLD && domArr[domArr.length-1].length!=2 &&
domArr[domArr.length-1].search(knownDomsPat)==-1) {
alert("The address must end in a well-known domain or two letter " +
"country.");
return false;
}
if (len<2) {
alert("This address is missing a hostname!");
return false;
}
return true;
}
</script>
</HEAD>
<BODY>
<form name=emailform onSubmit="return emailCheck(this.email.value)">
Your Email Address: <input type=text name="email"><br>
<input type=submit value="Submit">
</form>
</body>
</html>
Vipin
|
|
|
|
|
That is probably the most over-bloated way of checking an email address ever...considering javascript supports regular expressions. String mashing to determine email validity is not a solution in todays programming world!
1!
|
|
|
|
|
Hi,
I found some problem in populating the Selected Items in the Shopping Cart.
In my ProductDetail Page, i have the Button for "Add Cart". When i clicked it, that particular item will be added to Cart and that "ShoppingCart" page needs to be displayed with Current Selection and Previously selected items ( if anything is already in cart).
I wish to do it without sending any data in URL. Probably i wish to use JavaScript to do this work..
Can anybody help me in this?
Thanks in advance.
Regars,
Jay
|
|
|
|
|
Hi all
Can any one tell what wrong here
Dim popupScript As String = "" & _
"window.open('PopUp.aspx', 'CustomPopUp', " & _
"'width=200, height=200, menubar=yes, resizable=no')"
Page.RegisterStartupScript("PopupScript", popupScript)
I wrote this code in .aspx page (stand alone page)
But it is giving this error
String constants must end with a double quote
THX
asdfasdfasdfasdfasdfasdfasdfasdfasdfasdf
|
|
|
|
|
I dont find any problem in that. I am not getting any compile time error after the compilation.
Best Regards,
Apurva Kaushal
|
|
|
|
|
It's probably the tag that ends your code in the middle of the string. Split the string in the middle of that tag.
kirthikirthi wrote: THX
here you go[^]
kirthikirthi wrote: asdfasdfasdfasdfasdfasdfasdfasdfasdfasdf
ölkjölkjölkjölkjölkjölkjölkjölkjölkjölkjölkjölkjölkj
---
b { font-weight: normal; }
|
|
|
|