|
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.
|
|
|
|
|
Hi, I get the exeception Value of 'Byte' cannot be converted to '1-dimensional array of Byte' when I run the following code.
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs)
Dim connect As String = "Data Source=localhost\sqlexpress;Initial Catalog=pubs;Integrated Security=True"
Dim sqlconnect As New System.Data.SqlClient.SqlConnection(connect)
Dim sqlcommand As New System.Data.SqlClient.SqlCommand("select * from Doc")
sqlcommand.Connection = sqlconnect
Dim dr As System.Data.SqlClient.SqlDataReader
sqlconnect.Open()
dr = sqlcommand.ExecuteReader()
While dr.Read()
Dim filename As String = dr("Title").ToString()
Dim contentType As String = dr("DocType").ToString()
Response.Clear()
Response.ContentType = contentType
Response.AddHeader("Content-Disposition", "attachment;filename=" + filename)
Response.BinaryWrite(CByte(dr("ContentDoc")))
Response.[End]()
End While
sqlconnect.Close()
End Sub
The line that is causing that problem is Response.BinaryWrite(CByte(dr("ContentDoc"))). Please help me fix this problem, thank you in advance for your help.
|
|
|
|
|
Well, for some reason, you seem to want to give sompeone the opportunity to download a file that's one byte in length. This is a mystery. Howevr, as you're converting dr("ContentDoc") to a single byte value, BinaryWrite is unable to accept that. Most people want to use BinaryWrite to write a file, which will be an array of bytes.
You should not use things like CByte, they are nasty VB6 rubbish only kept in VB.NET because of the fear of change in some VB6 users. Use the .NET stuff instead.
In this instance, I suspect the issue is that you want to convert to a byte array, instead of a byte.
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 )
|
|
|
|
|
Hello,
VS 2005
I have created a deployment web setup project for my web service.
It installs ok, but the customer want to install all the files in a specified location on their computer.
For example it currently defaults to inetpub\wwwroot\myWebService.
I am also using IIS 5.1
Many thanks for any suggestions,
Steve
-- modified at 18:43 Wednesday 8th August, 2007
|
|
|
|