|
deepalititi wrote: i have to store this class object in session object until when application is not closed.
Application is not closed means ? Do you mean browser ? If yes Talal's solutions is the best. Else you need to go with application variables.
|
|
|
|
|
Hi,
I am created a web application such a type that user can upload the image by drag image from window explorer and drop in web page. Obviously drop image should be on one animation control only. user can see dropped thumbnail images over web page. and then by single click user can upload the images.
Means in single line Drag and Drop and Upload.
Note:Image path retriving from listbox.These path generated when user is dropped the image.
Here we have not using any html inputFile control.
So my problem is,I can not uploading images on server from client machine.But it is working fine on Local PC.
Can any one give me solution for this?
Thanks in Advance!!!!
|
|
|
|
|
FileUpload has SaveAs method to save file on server.
But as per ur requirement u have to download image from server and save to server
are every images on server?
If yes try this code
MemoryStream stream = new MemoryStream();<br />
System.Net.WebClient wc = new System.Net.WebClient();<br />
byte[] image;<br />
string path="ImagePath";<br />
image = wc.DownloadData(path);<br />
int indx = path.LastIndexOf("/");<br />
path = path.Substring(indx + 1);<br />
stream.Write(image, 0, image.Length);<br />
Bitmap bmp = new Bitmap(stream);<br />
bmp.Save(Server.MapPath(path));
Hope this will be helpful
Best Regard
pathan
---------------------------------------------------
|
|
|
|
|
tulsulkar wrote: I can not uploading images on server from client machine.But it is working fine on Local PC.
Because in Local PC your ASP.NET account will have Read/Write permissions. But in your client machine, it don't have permissions.
Is your application working on Intranet ? Then you can permit ASP.NET account to access files contained in the specified folder.But if it is working internet, I think that you need to get HTTPPostedFile class object to perform uploading. But getting this from ListBox seems to be impossible.
|
|
|
|
|
Hi,
On the close event of the window, I want to call a button click event which is present on the server side. so in the body tag in the onload() i am calling the button click event as follows:
<body bottomMargin="0" onunload="formclose();">
function formclose()
{
var res
res = confirm("Do you want to draft this mail, attachments will not be saved.")
if(res == false){
window.opener = self;
window.close();
}
if(res == true)
{
alert(res);
document.getElementById('btnsavclose').click();
}
}
But only the confirmation meassage is fired and not the button click event.
plz suggest me a solution.
riz
Riz
|
|
|
|
|
Do u want to call javascript on button click event?
If yes , use btn.Attribute.Add in code behind page to call javascript
Best regard
Pathan
---------------------------------------------------
|
|
|
|
|
No..... I dont want to call a javascript. In my javascript i am calling the button click event in the server code. But the button click event does nt get fired.
Plz help me out.
Riz
|
|
|
|
|
check out ur button object found or not alert(document.getElementById('btnsavclose'));
Best Regard
pathan
---------------------------------------------------
|
|
|
|
|
button object is found. But it does not go to the server side code of the button click.
Riz
|
|
|
|
|
try this
if(res == true)<br />
{<br />
<br />
document.getElementById('btnsavclose').click();<br />
return true;<br />
}
Best regard
Pathan
---------------------------------------------------
|
|
|
|
|
I suspect the form is closing before your method call can do anything. A click involves a postback. A postback involves the page reloading. The page can't close, and reload.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
helooo...
im binding a datagrid in webpage.in that one column is a linkcolumn ;
In that column some datas are with singlequotes;like "abc'" if im clicking dat perticular data i couldnt able to pass dat value to nextpage;plase gv a solution...
|
|
|
|
|
Please post ur code also then we help u
Best Regard
pathan
---------------------------------------------------
|
|
|
|
|
You need to Encode the url. Use Server.URLEncode
|
|
|
|
|
Dear all,
I have created on grid view which shows out put as follows:
1 2 3 ... >>
or
<< ... 2 3 4 >>
But I require the output as follows:
<< < 3 4 5 > >>
or
First Prev 3 4 5 next Last
Thanks,
sanjay kumar samantaray
|
|
|
|
|
U have to apply custom paging and no option available other than this. i have lots of custom paging, but cant paste whole code.
Hello Forum
Always be in touch to help about the topic ASP.NET
|
|
|
|
|
Please send it to : sanjaya_samantaray@rediffmail.com
Thanks
sanjay kumar samantaray
|
|
|
|
|
Sulabh is right.
ravi chandra
|
|
|
|
|
sir/madam ,
i have problem that i want to display and play flash image in imagebutton and when the page load,the image should play.I found solution but for that i have to purchase some flash player..Is there is not other way to create manually and play flash images.
Thanx in advance sir/madam
|
|
|
|
|
ASP.NET has no built in support for Flash. However, it's just an HTML engine, you can embedd any HTML you like. Assuming that the thing you need to buy lives entirely on the server, it must just be sending HTML, it's question of working out what script you need to write.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi,
I have this webpage that displays rows of data (using asp:repeater) and has a checkbox on the status column.
I also have a drop down list box of various status (e.g. started, completed, on hold, etc) and a button.
I need to user to check the data that he/she wants the status to be updated, choose the status (from the list box) and then update the database when they click on the button and the page refreshes
How can I go about doing this, within the same page? I tried doing it the ASP way (go through the names of the checkboxes and update accordingly) but it seem it doesn't work (not surprised there). It seems that the asp repeater gives the check boxes ids like ct100_content_output_ct101_cb.
Any help is greatly appreciated.
Desmond
|
|
|
|
|
Hi there
Just find out dropdownList on click of update button event and take a value of staus and update.
follow step
looping of Repeater.Items.Count
create object of dropdownlist
find out dropdownList from repeater and assign ddl object
take value of dropdownlist using ddl.SelectedItem.Value or .Text
pass this value to Update Query
end loop
Best regard
Pathan
---------------------------------------------------
|
|
|
|
|
Hi Pathan,
Thanks for the reply, but I don't get your "looping of Repeater.Items.Count", doesn't this just count the number of items that have been selected?
My page is like this.
<br />
ID Name Status<br />
1 name1 [checkbox] Started<br />
2 name2 [checkbox] Completed<br />
3 name3 [checkbox] Started<br />
4 name4 [checkbox] On hold<br />
<br />
[drop-down listbox] [submit]<br />
It means the user can check anyone of the boxes to change the status, I just can't see how counting the checkboxs would help.
I'm sorry if this is a redundant question but I'm really confused about asp.net.
Thanks.
Desmond
|
|
|
|
|
OK now just counting repeater items and find out check box of repeater and check it is checked or not,
if it is checked, update status
Best Regard
Pathan
---------------------------------------------------
|
|
|
|
|
Thanks Pathan! It is working now.
|
|
|
|