|
Hi,
I have source and destination listboxes and button ,
Click on selected items are moved from source to destination i did this thing with javascript it is working fine,
There is one button that is get postback, so that the selected items from source listbox. both listboxes are populated again from database.
how do we stop reloading listbox from database again
|
|
|
|
|
You can use return statement in javascript and return false if you dont want postback.
please don't forget to vote on the post that helped you.
|
|
|
|
|
Might be the reasone behind it is you are populating the listbox on every postback just check Ispostback property when page is first time loaded populate listbox else no need to populate listbox again, if viewstate is enabled.
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
modified on Thursday, February 07, 2008 8:39:15 AM
|
|
|
|
|
Hi sandeep,
This is the code i have written in page_load
When i click on button page get postback, and the code inside if is not executed as said but listbox2 items which i have selected from listbox1 is lost.
If Not Page.IsPostBack Then
Dim months1() As String = {"January", "February", "March", "April", "May", "June", "July"}
Dim months2() As String = {"a", "b", "c", "d"}
Me.ListBox1.DataSource = months1
Me.ListBox1.DataBind()
ListBox2.DataSource = months2
ListBox2.DataBind()
End If
Thanks in advance
|
|
|
|
|
Check viewstate of your page
<%@ Page Language="C#" EnableViewState="true" should be true
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
yes it true,
still iam refeshing listboxes
|
|
|
|
|
Now i don't know whats happening wrong there might be at application level the viewstate is false.
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
Hi,
I have registered a client script as
ClientScript.RegisterClientScriptBlock(this.GetType(), "script", "<script language='javascript'>alert(Hi..');</script>");
Now can I unregister this script.
Please give me a solution ASAP.
Vijay
|
|
|
|
|
tovijay.shukla wrote: I have registered a client script as
ClientScript.RegisterClientScriptBlock(this.GetType(), "script", "alert(Hi..');");
Now can I unregister this script.
There's no method to unregister a script. The solution is not to register the script in the first place.
tovijay.shukla wrote: Please give me a solution ASAP.
Hey, this is a free forum. You're not paying people for their help, so show some respect and be prepared to wait.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
hi i want to set size of form according to system resolution ... how to do that in windows application
Thanks & Regards,
Prashant B. Lavate
Software Engineer
Mobile : +919423872257
Pune(India)
|
|
|
|
|
Prashant B. Lavate wrote: hi i want to set size of form according to system resolution ... how to do that in windows application
Did you not notice that this is the ASP.NET forum?
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
how could i embed image in a xml file. plzz provide sample code or url from where i can get the code.
tbhattacharjee
|
|
|
|
|
Not having the code but i think you need to convert image into Binary then store that binary into xml file in perticualer node
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
you´ll get into some problems when storing binary data in your xml file.
i guess the standard way performing this would be encoding your image
data to base64, store the base64 data in a CDATA node
and when you want to get back to your image, base64 decode it and you
have your image data back.
to convert your Bitmap to a base64 string try something like
<br />
private string ImageToBase64(Image image)<br />
{ <br />
MemoryStream ms = new MemoryStream();<br />
image.Save(ms, ImageFormat.Bmp);<br />
string base64 = Convert.ToBase64String(memory.ToArray());<br />
ms.Close();<br />
return base64;<br />
}
and the other direction
private Bitmap Base64ToImage(string base64)<br />
{<br />
MemoryStream memory = new MemoryStream(Convert.FromBase64String(base64));<br />
Bitmap bitmap = new Bitmap(memory);<br />
memory.Close();<br />
return bitmap;<br />
}
|
|
|
|
|
thanks a lot for great code.
tbhattacharjee
|
|
|
|
|
suppose i have image binary data in a string and i want to encode that data applying base64 logic and as well as how can i decode that image data. plzz give me some sample code.
tbhattacharjee
|
|
|
|
|
If your converting Byte to string then don't convert it
just use Convert.ToBase64String(inArray, 0, inArray.Length,
Base64FormattingOptions.InsertLineBreaks);
If you are using string convert it to byte then try this
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
|
I tried a simple test where I click on a tab of a TabContainer from the ASP.NET Ajax Control Toolkit 1.0 (VS 2005). The test recorder records the actions. However, it fails to activate the tabs I click on.
This is what it generates:
IE ie = new IE("http://localhost:2138/WebClient/Content/TemplateManager.aspx");
ie.Span(Find.ByCustom("innertext","Spatial Settings")).Click();
ie.Span(Find.ByCustom("innertext","Color Settings")).Click();
where Spatial Settings and Color Setings are two of my tabs. Presumably there is an alternative method call I can use to make this work? Or is WatiN not compatible with the Control Toolkit?
|
|
|
|
|
I want to show different URL in browser
which is not a original.
how can I do using glabal.asax
thanks
You get the best out of others when you give the best of yourself.
|
|
|
|
|
Can you please explain a little more about what it is you are trying to achieve.
Thanx...
Clean code is the key to happiness.
|
|
|
|
|
I think ur question is not fully describes what exactly it wants?
So please can u give some more info for what u want to achieve.
Believe Yourself™ :->™
|
|
|
|
|
Can anyone send me the code or link how to Store and retrieve images from Sql server 2000. I'm using Asp.net 2.0 as front end.?? Plse help me...
|
|
|
|
|
None can help you for such easily available thing
Could you show attempts/efforts you put for doing this ?
Just Google the subject you will find n number of examples
Remember Google is you best friend
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
You Won't get the Code here, Cause it is not going to be an Exact thing that u want.
Just try urself and go for some references.
You can get Guideline and the way how to achieve it.
Believe Yourself™ :->™
|
|
|
|