Click here to Skip to main content
15,919,423 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: how to use the value of textBox placed on one page on to another page Pin
mavii6-Nov-07 20:18
mavii6-Nov-07 20:18 
GeneralRe: how to use the value of textBox placed on one page on to another page Pin
Christian Graus6-Nov-07 20:25
protectorChristian Graus6-Nov-07 20:25 
GeneralRe: how to use the value of textBox placed on one page on to another page Pin
N a v a n e e t h6-Nov-07 20:28
N a v a n e e t h6-Nov-07 20:28 
GeneralRe: how to use the value of textBox placed on one page on to another page Pin
Riza Azmi6-Nov-07 20:32
Riza Azmi6-Nov-07 20:32 
GeneralRe: how to use the value of textBox placed on one page on to another page Pin
N a v a n e e t h6-Nov-07 20:40
N a v a n e e t h6-Nov-07 20:40 
GeneralRe: how to use the value of textBox placed on one page on to another page Pin
Riza Azmi6-Nov-07 20:52
Riza Azmi6-Nov-07 20:52 
GeneralRe: how to use the value of textBox placed on one page on to another page Pin
John-ph6-Nov-07 20:44
John-ph6-Nov-07 20:44 
QuestionError while saving Bitmap on server. Pin
gopal_Pandey6-Nov-07 18:52
gopal_Pandey6-Nov-07 18:52 
Hello friends,

Here is another error which I am getting in asp.net

My task is to change the color of an image in grayscale or sepia and after that save that image to the server.

I have completed the half part of that task but in the remaining half i am getting an error.

The error is "System.ArgumentException: Invalid parameter used."

Now let me explain what i am doing is Using bitmap for changing image color and after that saving that bitmap on server at that point i am getting this error...

i am writing some of that code here:::



Public Function ConvertToGrayscale(ByVal source As Bitmap) As Bitmap

Dim bm As New Bitmap(source.Width, source.Height)

Dim x

Dim y

For y = 0 To bm.Height - 1

For x = 0 To bm.Width - 1

Dim c As Color = source.GetPixel(x, y)

Dim luma As Integer = CInt(c.R * 0.3 + c.G * 0.59 + c.B * 0.11)

bm.SetPixel(x, y, Color.FromArgb(luma, luma, luma))

Next

Next

Return bm

End Function
Public Function ConvertToSepia(ByVal source As Bitmap) As Bitmap

Dim bm As New Bitmap(source.Width, source.Height)

Dim R, G, B As Integer

Dim x

Dim y

For y = 0 To bm.Height - 1

For x = 0 To bm.Width - 1

Dim c As Color = source.GetPixel(x, y)

R = CInt(c.R * 0.393 + c.G * 0.769 + c.B * 0.189)
If R > 255 Then R = 255

G = CInt(c.R * 0.349 + c.G * 0.686 + c.B * 0.168)
If G > 255 Then G = 255

B = CInt(c.R * 0.272 + c.G * 0.534 + c.B * 0.131)
If B > 255 Then B = 255

bm.SetPixel(x, y, Color.FromArgb(R, G, B))

Next

Next

Return bm

End Function

Private Function uploadFile(ByVal oFile As System.Web.UI.HtmlControls.HtmlInputFile, ByVal cbochoose As DropDownList, ByVal txtITitle As TextBox, ByVal ControlNo As Long, ByVal CoverType As String)

Dim obm As Bitmap, obm1 As Bitmap, obm2 As Bitmap
obm = New Bitmap(oFile.Value)

obm1 = ConvertToGrayscale(obm)
obm1.Save(strFilePath & strFName_B)

obm2 = ConvertToSepia(obm)
obm2.Save(strFilePath & strFName_S)

obm.Dispose() : obm1.Dispose() : obm2.Dispose()

oFile.PostedFile.SaveAs(strFilePath & strFName & strFExt)
End Function

I don't know exactly where i am getting error... at which step...

Now tell me what will be the reason of getting that error.......

I am waiting for your reply....

please try it first and after that give the answer.

Thanks in advance................
AnswerRe: Error while saving Bitmap on server. Pin
Christian Graus6-Nov-07 19:17
protectorChristian Graus6-Nov-07 19:17 
GeneralRe: Error while saving Bitmap on server. Pin
gopal_Pandey7-Nov-07 22:12
gopal_Pandey7-Nov-07 22:12 
Questionunable to open excel template on client machine Pin
afreen taj6-Nov-07 18:51
afreen taj6-Nov-07 18:51 
AnswerRe: unable to open excel template on client machine Pin
John-ph6-Nov-07 19:30
John-ph6-Nov-07 19:30 
GeneralRe: unable to open excel template on client machine Pin
afreen taj6-Nov-07 19:37
afreen taj6-Nov-07 19:37 
Questionhow can i call code behind function through java script function (help plz) Pin
jagan1236-Nov-07 18:32
jagan1236-Nov-07 18:32 
AnswerRe: how can i call code behind function through java script function (help plz) Pin
N a v a n e e t h6-Nov-07 18:41
N a v a n e e t h6-Nov-07 18:41 
GeneralRe: how can i call code behind function through java script function (help plz) Pin
jagan1236-Nov-07 19:32
jagan1236-Nov-07 19:32 
GeneralRe: how can i call code behind function through java script function (help plz) Pin
N a v a n e e t h6-Nov-07 19:40
N a v a n e e t h6-Nov-07 19:40 
GeneralRe: how can i call code behind function through java script function (help plz) Pin
jagan1236-Nov-07 20:40
jagan1236-Nov-07 20:40 
GeneralRe: how can i call code behind function through java script function (help plz) Pin
N a v a n e e t h6-Nov-07 20:41
N a v a n e e t h6-Nov-07 20:41 
GeneralRe: how can i call code behind function through java script function (help plz) Pin
jagan1236-Nov-07 22:01
jagan1236-Nov-07 22:01 
AnswerRe: how can i call code behind function through java script function (help plz) Pin
Michael Sync6-Nov-07 18:42
Michael Sync6-Nov-07 18:42 
AnswerRe: how can i call code behind function through java script function (help plz) Pin
Navdeep Bhardwaj6-Nov-07 18:48
Navdeep Bhardwaj6-Nov-07 18:48 
Questioni want the code to run a procudere when enter key is pressed in asp.net apllication (help plz) Pin
jagan1236-Nov-07 18:20
jagan1236-Nov-07 18:20 
Answeri want the code to run a procudere when enter key is pressed in asp.net apllication (help plz) Pin
Sarani Ravindran6-Nov-07 18:33
Sarani Ravindran6-Nov-07 18:33 
AnswerRe: i want the code to run a procudere when enter key is pressed in asp.net apllication (help plz) Pin
Michael Sync6-Nov-07 18:35
Michael Sync6-Nov-07 18:35 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.