|
and you can also try "SmartNavigation" turn on.
|
|
|
|
|
Dear, Why you want to get the scroll bar position..............
Parwej Ahamad
g_parwez@rediffmail.com
|
|
|
|
|
Hi,
Is there a way to use groupBy in a datatable? I need to group some vaules in a column. I cannot use a sql query, as I am munipulating the data in the datatable for a gridview. I know there are no function/class available in asp.net, but maybe someone knows where to find something on the net, or had the same problem as me.
|
|
|
|
|
Hi,
Yes, we can use aggrigate functions for DataTable. Here is the sample code. You can use group by also.
<br />
DataTable table = dataSet.Tables["Orders"];<br />
<br />
object sumObject;<br />
sumObject = table.Compute("Sum(Total)", "EmpID = 5");<br />
enjoy...
regards
GV Ramana
|
|
|
|
|
Thanks Ramana.
Now if I want to group on a string, how would I do that?
My columns in datatable are F2 and F3. I want to group by F2, where F3 is the primary key.
|
|
|
|
|
Try this code
DataRow[] dr=DataTable.Select("gruopBy ColumnName");
Home this will help u?
Best regard
Pathan
GOD HELP THOSE WHO HELP THEMSELVES
|
|
|
|
|
Hi Pathan,
It looks like something that can help me, but where do I use it? Where I fill my new datatable, or from the current datatable?
|
|
|
|
|
HI.
By this code You will get array of datarow,
After that You can Import this array row in new table.
Like this
dataTable NewTable;
Datarow dr[]=datatabale.Select("groupBy columnName");
foreach(datarow dr1 in dr)
{
NewTable.ImportRow(dr1);
}
Best Regard
Pathan
GOD HELP THOSE WHO HELP THEMSELVES
|
|
|
|
|
hi friends
i wrote the code in application hitcounter.whenever load the page the value is count.(it is work fine)
but i closed the project then opend,it showed the count 1
but i need whenever run the project counting will be incremented.not reset to 1
this is my code
private void Page_Load(object sender, System.EventArgs e)
{
Application.Lock();
if (Application[Request.Browser.Browser] != null)
Application[Request.Browser.Browser] = (int)Application[Request.Browser.Browser] + 1;
else
Application[Request.Browser.Browser] = 1;
Application.UnLock();
for (int i=0; i<application.count; i++)
="" response.output.write("<p="">{0} : {1} hits", Application.GetKey(i), Application[i]);
}
regards
saravanan
|
|
|
|
|
store the last updated value in a xml or database..
Just before closure of the application update the information and close!!
When opening, just update it wherever ur storing it!!!
I was born dumb!!
Programming made me laugh !!!
--sid--
|
|
|
|
|
With your implementation the variable is persisted in the application variables meaning whenever the application is restarted the variable will be reset back to zero.
You need to rethink the way this works, possibly by saving the value to a database so that it can be persisited.
|
|
|
|
|
I designed a login page in asp.net with vb.net, if I refresh the page all the textbox values are presented except password textbox. If I refresh the page the password textbox value should remain in it. So please help me.
jai prakash
|
|
|
|
|
You won't be able to assign value to password text box,
|
|
|
|
|
Navaneeth is correct, you shouldn't try to work around these standard GUI functions. People expect this to work in this fashion - any other way is potentially a security problem.
|
|
|
|
|
i was searching for the email validation (validation control).I found the following line for the custom validation.
could u please explain the meaning of the following line?
\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*
Sonia Gupta
Soniagupta1@yahoo.co.in
Yahoo messengerId-soniagupta1
Love is Friendship and Friendship is Love....
|
|
|
|
|
function validation()
if(document.Form1.txtadvmail.value=="")
{
alert("Please fill the mailid");
document.Form1.txtadvmail.focus();
return false;
}
if (checkMailId(document.Form1.txtadvmail.value)==false)
{
document.Form1.txtadvmail.value=""
document.Form1.txtadvmail.focus();
return false;
}
function checkMailId(id)
{
var arr = new Array('.com','.net','.org','.biz','.coop','.info','.museum','.name','.pro'
,'.edu','.gov','.int','.mil','.ac','.ad','.ae','.af','.ag','.ai','.al',
'.am','.an','.ao','.aq','.ar','.as','.at','.au','.aw','.az','.ba','.bb',
'.bd','.be','.bf','.bg','.bh','.bi','.bj','.bm','.bn','.bo','.br','.bs',
'.bt','.bv','.bw','.by','.bz','.ca','.cc','.cd','.cf','.cg','.ch','.ci',
'.ck','.cl','.cm','.cn','.co','.cr','.cu','.cv','.cx','.cy','.cz','.de',
'.dj','.dk','.dm','.do','.dz','.ec','.ee','.eg','.eh','.er','.es','.et',
'.fi','.fj','.fk','.fm','.fo','.fr','.ga','.gd','.ge','.gf','.gg','.gh',
'.gi','.gl','.gm','.gn','.gp','.gq','.gr','.gs','.gt','.gu','.gv','.gy',
'.hk','.hm','.hn','.hr','.ht','.hu','.id','.ie','.il','.im','.in','.io',
'.iq','.ir','.is','.it','.je','.jm','.jo','.jp','.ke','.kg','.kh','.ki',
'.km','.kn','.kp','.kr','.kw','.ky','.kz','.la','.lb','.lc','.li','.lk',
'.lr','.ls','.lt','.lu','.lv','.ly','.ma','.mc','.md','.mg','.mh','.mk',
'.ml','.mm','.mn','.mo','.mp','.mq','.mr','.ms','.mt','.mu','.mv','.mw',
'.mx','.my','.mz','.na','.nc','.ne','.nf','.ng','.ni','.nl','.no','.np',
'.nr','.nu','.nz','.om','.pa','.pe','.pf','.pg','.ph','.pk','.pl','.pm',
'.pn','.pr','.ps','.pt','.pw','.py','.qa','.re','.ro','.rw','.ru','.sa',
'.sb','.sc','.sd','.se','.sg','.sh','.si','.sj','.sk','.sl','.sm','.sn',
'.so','.sr','.st','.sv','.sy','.sz','.tc','.td','.tf','.tg','.th','.tj',
'.tk','.tm','.tn','.to','.tp','.tr','.tt','.tv','.tw','.tz','.ua','.ug',
'.uk','.um','.us','.uy','.uz','.va','.vc','.ve','.vg','.vi','.vn','.vu',
'.ws','.wf','.ye','.yt','.yu','.za','.zm','.zw');
var mai = id;
var val = true;
var dot = mai.lastIndexOf(".");
var ext = mai.substring(dot,mai.length);
var at = mai.indexOf("@");
var dom = dot - at;
var sp = mai.indexOf(" ");
if(dom >= 4 && at >1 && sp == -1)
{
for(var i=0; i<arr.length; i++)
{
if(ext == arr[i])
{
val = true;
break;
}
else
{
val = false;
}
}
if(val == false)
{
alert("Please enter an exact email address");
return false;
}
}
else
{
alert("Please enter an exact email address");
return false;
}
return true;
}
put this in page load
btnaccept.Attributes.Add("onclick", "return validation();")
jai prakash
|
|
|
|
|
|
wat exactly does it do??? dint get anything!!!
I was born dumb!!
Programming made me laugh !!!
--sid--
|
|
|
|
|
w stands for an alphabet like 'a','b' etc!!
\w means it can be any no of alphabets so it confirms that the email id starts with an alphabet
then within it ([-+.] means it can have any of these characters in between
\w at the end ensures that the email id ends with a alphabet as well
then a compulsory @ and so on!!!!
I was born dumb!!
Programming made me laugh !!!
--sid--
|
|
|
|
|
thanks sid.....
Sonia Gupta
Soniagupta1@yahoo.co.in
Yahoo messengerId-soniagupta1
Love is Friendship and Friendship is Love....
|
|
|
|
|
Anytime!!!
I was born dumb!!
Programming made me laugh !!!
--sid--
|
|
|
|
|
Are you familiar with regular expressions ?
Sonia Gupta wrote: \w+
This line matches for any characters, numbers and alphabets
Sonia Gupta wrote: ([-+.]\w+)*@
This is another regular expression (nested). This matches a single character that is a word charcter and force to match "@".
Sonia Gupta wrote: [-.]
Matches a single character present in the list.
I think from this information you can iterate the remaining. Try for it.
|
|
|
|
|
OK thanks Navaneeth......
Sonia Gupta
Soniagupta1@yahoo.co.in
Yahoo messengerId-soniagupta1
Love is Friendship and Friendship is Love....
|
|
|
|
|
That's a regular expression. It's a syntax for describing patterns within strings, and can be quite powerful. It takes some time and research to understand them, but I find it well worth it. That particular one is a bit strange though... I'm not sure if I fully get what it's going for. I'd suggest something along the lines of:
^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$
|
|
|
|
|
i usinng div (scroll bar) for chat window.and chat window text retrive from hash table and hash table refresh by ajax timer(in 1 sec.) so page alwas post back so i cnt manage scroll bar freely plz help
Piyush Vardhan Singh
Programmer
TAS NewDelhi
India
9313077379
|
|
|
|
|