|
Session["items"] = lb1.SelectedItem.Value;
Response.Redirect("Page.aspx?sql=session["items"].Tostring());
use Session state instread of Viewstate
|
|
|
|
|
Right, below is my code. It is still not working, I thought a new day would bring new answers but no.
PageLoad:
lbitems.Text = "Items selected: " + Session["items"];
Button(This posts back to the same page):
if (listbox1.SelectedItem != null)
{
string strValues = "";
for (int i = 0; i < listbox1.Items.Count - 1; i++)
{
if (listbox1.Items[i].Selected)
{
strValues += listbox1.Items[i].Value + ",";
}
}
strValues += listbox1.Items[listbox1.Items.Count - 1].Value;
Session["items"] = strValues;
}
Response.Redirect("~/main/Page.aspx?sql=items");
Why is this not working?
It doesnt display any selected values.
thanks
Deliver yesterday, code today, think tomorrow.
"http://www.heuse.com/cphumor.htm"
|
|
|
|
|
The code
strValues += listbox1.Items[listbox1.Items.Count - 1].Value;
is wrong becauce you will allways add the last item, no mather if it is selected.
I would recomand the modefide answer I gave you.
Do you redirect to the same page?
|
|
|
|
|
Hello Friend's
I get User Name from Group which created by the system but i cud not get that user from group which created by us. in other word
i get only that user which is builten(Property name of Active directory) in active directory.
Piyush Vardhan Singh
p_vardhan14@rediffmail.com
http://holyschoolofvaranasi.blogspot.com
http://holytravelsofvaranasi.blogspot.com
|
|
|
|
|
can you put the code where you read user name from AD along with LDAP Query.
cheers,
Abhijit
Think Sharp | Code Sharp | C Sharp
|
|
|
|
|
Please provide the code den it'll be better
Cheers!!
Brij
|
|
|
|
|
hi,
i need some advice on report writing using asp.net.
currently i am using vs2005 and crystal to write them reports.
is there any other way to get the similar type of reports but using less overhead or could you tell me the best reporting tool for the web environment?
using maybe excel, asp/html????
your opinion will be appreciated...
thanks
Anoop
|
|
|
|
|
Hi
Is it possible to put html coding in stored procedure?
Like so:
select field1, field2 + ' - - ' + field3 as Fields from table
thanks
Hope this question isnt as silly as it sounds!
Deliver yesterday, code today, think tomorrow.
"http://www.heuse.com/cphumor.htm"
|
|
|
|
|
Hi,
This is not a asp.net question, but if you are trying to concatenate HTML string with database column , yes you can do that
|
|
|
|
|
I need to put "<b>" in a stored procedure so that one of the columns is in bold. The reason I am doing it this way is because I am merging 2 columns into 1 and then displaying it in a listbox.
Deliver yesterday, code today, think tomorrow.
"http://www.heuse.com/cphumor.htm"
|
|
|
|
|
The answer is yes, as long as your database columns are not numeric types - if they are then you need to cast them to varchar.
create table #b1 (nme varchar(10), valuecol in)
select name + 'html codes' + convert(varchar,valuecol)
Bob
Ashfield Consultants Ltd
|
|
|
|
|
Its possible as described above, but rarely is it a good solution. Databases are for data, UI's are for presentation.
|
|
|
|
|
Hi
i want write a windows service and start it in spesific time and date but i dont know set a parameter for onstart method. can any body help me or give me a sample
|
|
|
|
|
|
can u say where should i ask?
|
|
|
|
|
Hi,
Windows services are program that runs in the background forever, however if you want to start your service at a particular time you will have to implement service controller. But i dont know why you want to do that. Just implement timer control and check for the event at which you want your windows service to do something
Regards
|
|
|
|
|
i want it start a particulat time or date . my mean is i want run it in particular time or date.
can write me a simple example about time plz. my behinde code is this:
protected override void OnStart(string[] args)
{
//TODO: Add code here to start your service.
ServiceController controller = new ServiceController();
string status = controller.Status.ToString();
eventLog1.WriteEntry("my service started");
//Start the service
controller.Start();
//Stop the service
controller.Stop();
}
and how can we trace it?
|
|
|
|
|
|
for encryption and decryption of the web.config file iam using data DataProtectionConfigurationProvider the problem is when the project was in d drive then
the encryption and decryption of config file working properly .but whn it is kept in the c: drive it is giving a error that unterminate string error it is giving .how this problem resolved.
|
|
|
|
|
The project is working when it was in drive d and then keeping it in c drive if is not working then there must be some configuration issue.
I have face the same kind of problem but for issue tracker and It got reslove by Registering the DLL
Start>Run>
regsvr32 %windir%\Microsoft.NET\Framework\v1.1.4322\aspnet_isapi.dll
so just try it
Good Luck
|
|
|
|
|
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll was loaded, but the DllRegisterServer entry point was not found.
|
|
|
|
|
Just go to IIS and right clicked on your website, clicked permissions, then add IIS_WPG from the local server and give full permission to it.
|
|
|
|
|
hello joshi iam not able to find this one will u please the correct process again
|
|
|
|
|
|
Hi Guys
Is it possible to show two columns in a Listbox?
thanks
Deliver yesterday, code today, think tomorrow.
"http://www.heuse.com/cphumor.htm"
|
|
|
|