|
Hide: document.getElementById('panelid').style.display = 'none'
Show: document.getElementById('panelid').style.display = 'block'
Parwej Ahamad
g.parwez@gmail.com
|
|
|
|
|
Hi Friend,
Thank you for your quick reply.
But unfortunately it is not working..
<table>
<tr> < td >hai sanker <td> </tr >
< asp:panel id=p1 style="display:block;"
<tr> < td >sanker@sanker.com <td> </tr > >
</asp:panel >
<tr> < td > ph:0501651816 <td> </tr >
</table>
or on cahnge event of dropdwon
<br />
function mypanel()<br />
{<br />
alert('hai');<br />
document.getElementById('p1 ').style.display = 'none'<br />
}<br />
that alert is wrking but hide is not wrking.
any idea??
All I ever wanted is what others have.... CrazySanker
|
|
|
|
|
In id you have use sapce:
document.getElementById('p1 ').style.display = 'none'
document.getElementById('p1')style.display = 'none'
Parwej Ahamad
g.parwez@gmail.com
|
|
|
|
|
i remove that space.. but it is not still not functioning!!
All I ever wanted is what others have.... CrazySanker
|
|
|
|
|
While using javascript check how the applicaion works in other browsers like mozilla i.e test your application in other browsers also if you want your application to be browser compliant
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... "
|
|
|
|
|
try using
<asp:panel id="p1" onload="ShowPanel()">
function ShowPanel()
{
alert('hai');
document.getElementById('p1').style.display = 'block';
}
and on cahnge event of dropdwon
function mypanel()
{
alert('hai');
document.getElementById('p1').style.display = 'none'
}
Paras Kaneriya The difference between genius and stupidity is that genius has its limits.
|
|
|
|
|
thanks for ur reply.
sorry,where we call ShowPanel() function.
All I ever wanted is what others have.... CrazySanker
|
|
|
|
|
Actually i am using Ajax.dll.
i am new to this AJAX wrold also.
my doubt is though ajax we can enable or hide panale??
means i ave a c# function like
<br />
[Ajax.AjaxMethod]<br />
public string ChangeMe()<br />
{<br />
<br />
if (DrpDelMode.SelectedValue == "B")<br />
{<br />
Pnlcounter.Visible = false;<br />
PnlBankDet.Visible = true;<br />
TxtPaymentDetails.Rows = 8;<br />
}<br />
else<br />
{<br />
Pnlcounter.Visible = true;<br />
PnlBankDet.Visible = false;<br />
TxtPaymentDetails.Rows = 4;<br />
}<br />
TxtPaymentDetails.Text = DrpDelMode.SelectedItem.Value;<br />
return "Hai Ajax";<br />
}<br />
On change event of a dropdwon control i can invoke a JS function
<br />
function showpanle()<br />
{<br />
alert('ha1');<br />
showpanel.ChangeMe(callback_Show);<br />
}<br />
<br />
function callback_Show(res)<br />
{<br />
document.getElementById("TxtPaymentDetails").innerText = res.value;<br />
<br />
}<br />
in this above piece of code alert wrking fine and document.getElementById("TxtPaymentDetails").innerText value is null
how can i can solve this issue?
All I ever wanted is what others have.... CrazySanker
|
|
|
|
|
there is an ole field in the database , now i want that pic to show in the c# form using asp..net.
How can i do it?
Soniagupta1@yahoo.co.in
|
|
|
|
|
You can refer below link:
http://www.odetocode.com/Articles/172.aspx
Parwej Ahamad
g.parwez@gmail.com
|
|
|
|
|
but this does not illustrate how to display the image in a image contol.
there are textboxex and one image control.
can u explin how to display the image in the image control?
Soniagupta1@yahoo.co.in
|
|
|
|
|
I got your point:
According to me first you need get the images from database and then save it any temp location.
After that show the images in image control from the temp location.
These are already discussed in article :
href="http://www.codeproject.com/useritems/ImageFromDBtoGrid.asp
Parwej Ahamad
g.parwez@gmail.com
|
|
|
|
|
this link does not exist
Soniagupta1@yahoo.co.in
|
|
|
|
|
http://www.codeproject.com/useritems/ImageFromDBtoGrid.asp
Parwej Ahamad
g.parwez@gmail.com
|
|
|
|
|
i don;t have datagrid in my page.the only control is the image control
Soniagupta1@yahoo.co.in
|
|
|
|
|
No problem :
first save it on any temp location Like :
c:\temp\a.jpg
then
provide image url (c:\temp\a.jpg) to image control
Parwej Ahamad
g.parwez@gmail.com
|
|
|
|
|
how can i save to temporary location
Soniagupta1@yahoo.co.in
|
|
|
|
|
Create your own temp folder within your application.
Parwej Ahamad
g.parwez@gmail.com
|
|
|
|
|
byte[] byteArray = (byte[])dr.GetValue(26);
how can i save this byte data into a jpg file
can i get the code.
or is there any way to save into a jpg file directly.
Soniagupta1@yahoo.co.in
|
|
|
|
|
Hi you can take help with this code:
Code to save your ImageData Byte array in c:\MyFolder directory
FileStream fs = new FileStream(@"c:\MyFoleder\MyJpg.jpg", FileMode.Create, FileAccess.Write);
fs.Write(imageData, 0, imageData.Length);
if you want to ensure that either C:\MyFolder exists or not .....then
if(!Directory.Exists(@"c:\MyFolder"))
Directory.CreateDirectory(@"c:\MyFolder");
Parwej Ahamad
g.parwez@gmail.com
|
|
|
|
|
everything is going on vey smoothly excepy one thing pic is not appearing in th image control.
but the pic is being successfully saved on the hard drive.
here is the code i am using
img1.Src = Server.MapPath("MyJpg.jpg");
this is for image tag
image1.imageurl=Server.MapPath("MyJpg.jpg");
Soniagupta1@yahoo.co.in
|
|
|
|
|
This is your path problem, so i don't have idea your project image location.
Please makes sure path like:
string path=Server.MapPath("MyJpg.jpg");
debug the code for value of path if not exact then
check like......
string path=Server.MapPath("/images/MyJpg.jpg");
Parwej Ahamad
g.parwez@gmail.com
|
|
|
|
|
F:\VisitorManagement\MyJpg.jpg
thsi is the path where is pic is located.when i point my curson then the path is
F:\\VisitorManagement\\MyJpg.jpg
when i see the path in watch then it is
F:\VisitorManagement\MyJpg.jpg
is there any problem??
Soniagupta1@yahoo.co.in
|
|
|
|
|
I think it's fine,
you can test with this path, provide direct url to image control.
Parwej Ahamad
g.parwez@gmail.com
|
|
|
|
|
thanks.......
Soniagupta1@yahoo.co.in
|
|
|
|