|
This may be a newbie question, but I am using System.Net.Mail to send an email, containing the data from a form. getting the text from the textboxes, and selected values from the drop-down boxes was easy. What I am struggling with now is how to get a list of which items, from within the 'checkboxlist' were selected when the 'submit' button was clicked. The most I have been able to get so far, using the .SelectedItem attribute is the FIRST value. I haven't figured out how to retrieve the collection that is a list of all the items that were selected. Make sense?
any help or ideas would be appreciated.
Thanks
,Gary
|
|
|
|
|
loop through the checkbox list and check if the item is selected then get its text. something like this:
<br />
foreach(ListItem li in cblist.Items)<br />
{<br />
if(li.Selected)<br />
}<br />
-----
|
|
|
|
|
|
i finished my project and now the deployment phase.
i have done the web-setup project and worked well.
my problem is with tha database.
my database is SQL Server 2005
and when i install the web i included a .bak file to resotre.
is the user forced to install the whole enterprise sql server or,
is the sql express edition enough for the web consedring that i have
"Insert,Update,Delete,Backup,Resotre,Drop" command (SQL Queries) in my application.
so plz im looking for help.
|
|
|
|
|
in a web project users do not have to have sql server at all. All you need is to install the sql server on the database server or web server if both are same and connect to the database server through your code.
-----
|
|
|
|
|
I think u didn't get my prob. correctly............
Actually i've a textbox(Multiline) in which i've to search a particular string
Example:-
this is a paragraph given below and i have to search a string "quick"
then answer would be 4
The quick brown fox jumps over the little lazy dog.Hello How R U.
The quick brown fox jumps over the little lazy dog.Hello How R U.
The quick brown fox jumps over the little lazy dog.Hello How R U.
The quick brown fox jumps over the little lazy dog.Hello How R U.
|
|
|
|
|
|
And it's a dodgy cross post as well.
|
|
|
|
|
No it's a dodgy ................
i think you didnt get the meaning of my question properly at all! Read the other part of this thread ????????????????????
|
|
|
|
|
The Knowledge wrote: think you didnt get the meaning of my question properly at all!
I did. That's why I recognised it as a cross post. Please don't post the same question (or in this case part of a clarification) to multiple forums.
|
|
|
|
|
Get to solve ur problem.
function wordCount(str)
{
var count = 0;
var _arrWord = str.split(" ");
for (i=0 ; i < _arrWord.length ; i++)
{
if (_arrWord[i] == "quick")
count += 1;
}
alert("Total Word Count: " +count);
}
Devjit Das.
|
|
|
|
|
int num=0;
//This line get the word to be searched
string title=dt.Rows[0]["Title"].ToString();
//This line get a paragraph in which searchintg to be.. string content=dt.Rows[0]["Content"].ToString();
for(int i=0;i<content.length;i++)
{
=""
="" if(title="=content[i].ToString())
" num="num+1;
" }="" }
="" lblmsg.text="num.ToString();
<b<But" this="" piece="" of="" code="" giving="" just="" 0="" <="" b="">
|
|
|
|
|
so what's the problem convert that concept as where u like to u. i think it will work.
Devjit Das.
|
|
|
|
|
do u really think my code(i've given in my last post) is correct ???????
|
|
|
|
|
I haven't check ur code.It is ur way to check ur code. we can provide only concept not the code. ok man.
Devjit Das.
|
|
|
|
|
kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
|
|
|
|
|
iam having a grid view in a panel.i wrote a code in a such a way that when ever user type any value that value should come in the gridview.it is working fine but wen the size of the grid view is growing the panel is getting a scroll bar...now the problem is ...now iam not able to see the last row of my grid view which iam entering..how could be possible to view the last row of the grid view in the panel even wen a scroll bar is there
|
|
|
|
|
Hi Friends,
I am having a .aspx page with many controls in it.I have a text for logging out from my application.When the user clicks that "LogOut" text,he should be logged out from my application.I have written javascript function in Code behind to log out.How to call the javascript function in code behind by using href property of the text(Logout)..i.e when the user clicks the "Logout" text,the javascript function in code behind should be called..
Moreover,another issue is that if the user closes the page without even logging out from my application,i need to call the same javascript function in the code behind whenever he attempts to close the page by clicking the close button in the page.
Some one help in this regard as early as possible.
Regards,
Balaguru
|
|
|
|
|
Balagurunathan S wrote: I am having a .aspx page with many controls in it.I have a text for logging out from my application.When the user clicks that "LogOut" text,he should be logged out from my application.I have written javascript function in Code behind to log out.How to call the javascript function in code behind by using href property of the text(Logout)..i.e when the user clicks the "Logout" text,the javascript function in code behind should be called..
For this,
ClientScript.RegisterClientScriptBlock(GetType(), "test", "<script text='text/javascript'> alert('test');</script>");
Balagurunathan S wrote: Moreover,another issue is that if the user closes the page without even logging out from my application,i need to call the same javascript function in the code behind whenever he attempts to close the page by clicking the close button in the page.
to call function close window you can do this.
<script type="text/javascript"><br />
<br />
function doUnload()<br />
{<br />
<br />
if (window.event.clientX < 0 && window.event.clientY < 0)<br />
{<br />
alert("Window is closing...");<br />
}<br />
}<br />
</script>
Call on body's UnLoad event.
<body onunload="doUnload();"><br />
Thanks,
Sun Rays
To get something you must have to try once.
My Articles
|
|
|
|
|
Thanks SunRays..
I have one more doubt..
I have a function named logout() in my codebehind..Now i need to call this when the user closes the page using the close button..I am not clear with the one which you sent earlier..Kindly guide me to do this..i.e give relevant code to do this..How to call the function..?
Regards,
Balaguru
|
|
|
|
|
Thanks SunRays..
Its ok for calling a javascript function..
I have one more doubt..
How do i call a function in vb code in code behind ..?
I have a function named logout() in my codebehind..Now i need to call this when the user closes the page using the close button..I am not clear with the one which you sent earlier..Kindly guide me to do this..i.e give relevant code to do this..How to call the function..?
Regards,
Balaguru
|
|
|
|
|
Hi,
actually for close window's I had sent you code for Javascript function.
Balagurunathan S wrote: How do i call a function in vb code in code behind ..?
FOr this you can do same way as I were said for javascript.
just write your function string in that.
Thanks,
Sun Rays
To get something you must have to try once.
My Articles
|
|
|
|
|
Add linkButton say lnkRedirect instead of href.
and in javscript write __doPostBack('lnkRedirect', '');
Nana
|
|
|
|
|
Have you enabled the PopulateOnDemand property of each node?
If so, you will see the "+" sign until you open it.
|
|
|
|
|
Thanks for reply.
It works well.
rajesh
|
|
|
|