|
FTP is a file transfer protocol which is a utility to send the files between two machines of different locations.First you need to open your local FTP site and copy your file and open the same FTP site in remote machine and use it.To connect ftp i think you need VPN.
The easy way is just zip the file and mail it.open your mail in remotemachine and download the same and use it if the size is not so big.
Kiran Kumar.CH
(MCP)
|
|
|
|
|
I've Zipped the file and tried to send it but I made a mistake wrote a wrong server address and now I want to rename. When I try to zip I get the outlook express with the zip file attached to it. What could I do. Do I really have to delete the whole folder?
Thanks
|
|
|
|
|
1)
>Right click on .MSI file>winzip>add to <filename>.zip
>After creating zip file,open yahoomail and login with your id
>compose the mail with the zip file as attachment and send it to yourself.
>now go to remote machine and open your yahoomail and open that mail just now sent by you
>now click on attachment and save the zip file to mycomputer.
Another way to send files is:-
2)Do you have yahoo messenger in two machines,if you have then you login in both messengers with different id's,now send file<instant message=""> from Yahoo id1(local) to YahooId2(Remote).
Kiran Kumar.CH
(MCP)
|
|
|
|
|
Thanks Kumar,
This worked for me actually I had to share The file so that I Could read it on a different server. Hope you anderstand what I mean. But you have been of so much help thank you very much.
|
|
|
|
|
hi,
I'm developing an application in asp.net 2.0 .
Please anyone can tell me how to achieve functionality of image cropping
so that big images will be cropped to a given dimension (using c#).
Thank you.
yog
hui gfgh kgdgrt njjn hjgkn
|
|
|
|
|
hi yogita,
try this:
Imports System.Drawing.Image
Imports System.Drawing
Imports System.IO
Imports System.Text
Public Structure CropType
Public Height As String
Public Width As String
End Structure
Public Function Crop(ByVal Height As String, ByVal Width As String)
_pathOutputImage = getRandomName()
Dim bmpImage As Bitmap
Dim recCrop As Rectangle
Dim bmpCrop As Bitmap
Dim gphCrop As Graphics
Dim recDest As Rectangle
Try
TakeNote("Crop " & Height & " x " & Width)
bmpImage = New Bitmap(_inputImage)
recCrop = New Rectangle(0, 0, Width, Height)
bmpCrop = New Bitmap(recCrop.Width, recCrop.Height, bmpImage.PixelFormat)
gphCrop = Graphics.FromImage(bmpCrop)
recDest = New Rectangle(0, 0, Width, Height)
gphCrop.DrawImage(bmpImage, recDest, recCrop.X, recCrop.Y, recCrop.Width, _
recCrop.Height, GraphicsUnit.Pixel)
Catch er As Exception
TakeNote("CROP ERR: " & er.ToString)
Throw er
Finally
bmpCrop.Save(_pathOutputImage)
_inputImage = Image.FromFile(_pathOutputImage)
End Try
End Function
Thanks,
Rahithi
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 All,
How can I do audio streaming using Asp.Net? Actually I'm looking for some tutorials or code snippet. Please help me.
Mehedi Hasan
|
|
|
|
|
hi all,
right now i am trying to work on Datagrid.
1.How do you apply specific formatting to the data inside the cells? and in my gird i am giving option to the user to modify the rows. before updating the data, just i want to check whether the user modified any data??
2.How do you check whether the row data has been changed?
3.How do you customize the column content inside the datagrid?
just we need to make the column as Item template?? or do need to write any code?
thanks,
Rahi
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 Rahi,
I am not sure but this will give you some idea!
1.You can apply specific formatting to the data inside the cells using DataGrid rightclick>PropertyBuilder>Formatting>Items
2.You can add a hidden grid column say "Modified" and it's default value is "N".Now in DataGrid1_ItemDataBound you need to add clientside ontextchage eventhandler for desired cells
Serverside:-
private void DataGrid1_ItemDataBound(object sender,System.Web.UI.WebControls.DataGridItemEventArgs e)
{
//This code is for assigning userdefined Id's for rows and columns
e.Item.ID = "Row" + i++;
for(int j=0;j<7;j++)
e.Item.Cells[j].ID="Column"+j;
//Here you need to pass the rowid
e.Item.Cells[j].Attributes.Add("ontextchanged","modif('"+ e.Item.ID + " ')" );
}
JavaScript:-
function modif(RowId)
{
//This line will set the value to 'Y' when the row is modified
document.getElementById('DataGrid1_'+RowId +'_Modified').innerText="Y"
}
3.When you give the provision for editing the rows you can also validate the datagrid.
private void Page_Load(object sender, System.EventArgs e)
{
da.Fill(dataSet11,"employee");
DataGrid1.DataBind();
Button1.Attributes.Add("onclick","return validate()");
}
JavaScript:-
function validate()
{
if(document.getElementById('DataGrid1_Row0_Column1').innerText="")
alert('Please enter ');
//Like this you can set the values to the grid
document.getElementById('DataGrid1_Row0_Column1').innerText="kkkk";
alert(document.getElementById('DataGrid1_Row0_Column1').innerText);
return false;
}
Kiran Kumar.CH
(MCP)
|
|
|
|
|
Hello,
I am creating a new profile to a user:
Dim profile As ProfileCommon = CType(ProfileCommon.Create(user.UserName, True), ProfileCommon)
With profile.Contact
.City = tbCity.Text
.District = CType(Int32.Parse(ddlDistrict.SelectedItem.Value), Enumeration.District)
End With
With profile.Options
.Newsletter = cbNewsletter.Checked
End With
profile.Save()
I get the error:
Type 'System.Web.Profile.ProfileBase' in Assembly 'System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' is not marked as serializable.
Contact and Options are classes with properties and a few methods which are defined as:
<Serializable()> _
Public Class Options
...
And in my Web.Config, under profile, I have:
<properties>
<add allowAnonymous="false" name="Contact" type="Contact" serializeAs="Binary"/>
<add allowAnonymous="false" name="Options" type="Options" serializeAs="Binary"/>
</properties>
Any idea what might be going on?
Thanks,
Miguel
|
|
|
|
|
Hi all,
I am working with asp.net 2.0 and i am using a gridview in which i use an button to delete an an item and it works perfectly if i dont call a confirmation javascript. i bind the javascript function in rawdatabound event to that button. when i use this javascript confirmation, the RowDeleting event doesnt get fired. but page load occures. Any idea friends?
Thanks in advance.
Ali
|
|
|
|
|
alimohammed wrote: i bind the javascript function in rawdatabound event to that button.
This happens when
1. If you are not returning false after clicking cancel.
2. Script Error.
Check for the both errors.
|
|
|
|
|
I have a label in my page that display an error when it find it.
This is what it does.
The user enters a value in a text box, It looks in a database and if does not find the value displays a label saying that that value does not exist and to type another value. When the user types a correct value it redirect to another page with the results for that value. When the user hit the back button in the browser the label is disply again saying that the value does not exist, but it does.
How can i disable this label after the page is redirected so when the user hit the back button that label is not display ?
Thanks
Javierarka
|
|
|
|
|
Im not sure if it works, though try a javascript function in onload of that page which does history.clear. Search for it on web...
|
|
|
|
|
Just check if its a post back before writing anything to the label, and before redirecting erase the label's text.
------------------------------ "The Soapbox has been so ..."
|
|
|
|
|
I have a quick question. If you need a button that can be accessed from the server during the intial post but want it to only do client side scripting (with a little asynchorous communication), is it better to use the "ASP:BUTTON" or the html "input" tag? If asp:Button, how do you cancel the server side post and do only the client side script?
Thanks,
Leo T. Smith
|
|
|
|
|
Don't set a Click handler, but an onclick, which will pass through to the client. Use an asp:Button if you want to manipulate it in code.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
I have no OnClick handler defined, and I have tried using onclick (cause the page not to compile and run). I have tried OnClientClick and returning false from the function. I have tried the OnClick which obviously tells me there is not a server side script. Here is a couple of examples:
// Function always returns false. Both client and server side execute.
<asp:button runat="server" id="btnContact" font-size="7pt" height="20" onclientclick="CallContactUpdate(1);" text="Add New">
// Same function errors when compiling.
Error 1 = ) Expected
Error 2 = Invalid expression term ')'
<asp:button runat="server" id="btnContact" font-size="7pt" height="20" onclick="CallContactUpdate(1);" text="Add New">
Leo T. Smith
|
|
|
|
|
Oh - OnClientClick, that's it. IS there an AutoPostBack property on the button class ?
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
Sorry all. My last post I was in a hurry and sent the actual asp:button with html format totally forgetting script injection issues. As to the autopostback; no I didn't set it (it is missing and my understanding is that it makes it false, which I could be wrong for a button). I did notice that when I look at the HTML source code that is generated by the server, the button's type is set to 'submit' and not 'button'. Is there a way to change the type here to 'button' (can't find anything to tell how to set this to 'reset' either). That would resolve this issue. If it would help, I will resend the actual tags to without the > or < literals later.
Thanks,
Leo T. Smith
|
|
|
|
|
As stated elsewhere, the resolution was that I had not setup the OnClientClick event to a return itself.
OnClientClick="MyFunc(); return false;"
Thanks everyone for your assistance.
Leo T. Smith
|
|
|
|
|
Leo Smith wrote: If asp:Button, how do you cancel the server side post and do only the client side script
You can wire a javascript function to the OnClientClick event.If the JS function returns false,the server side post will be canceled.
|
|
|
|
|
This is what I tried and the function returns only false. When the button is clicked, I see what is suppose to happen, then the page immediately posts and all is lost.
Thanks,
Leo T. Smith
|
|
|
|
|
Are you trying like this?
OnClientClick event has "return MyFunction()" code?
|
|
|
|
|
Actually this might be the issue. I didn't have the return inside the onclientclick call. I'll test it and let you know.
Thanks,
Leo T. Smith
|
|
|
|