|
I think U Being a
Don't Worry She Post.
|
|
|
|
|
hello everyone
can you expalin the following errors which invoked invoked into web server while my site is running on trial.....
Details as follows and seperate by numbering
1.Exception Type : System.Security.Cryptography.CryptographicException
Exception Message : Padding is invalid and cannot be removed.
Exception Source : mscorlib
Exception Target Site: DecryptData
2.Exception Type : System.Reflection.TargetInvocationException
Exception Message : Exception has been thrown by the target of an invocation.
Exception Source : mscorlib
Exception Target Site : _InvokeMethodFast
Deepak
Smile a Lots,Its Costs Nothing
|
|
|
|
|
i am usng ajax.net in my application. I am using a update panel in ajax.net.
update panel inside the dropdownlist. and already insert the script manager control. When run the application. then display error run time.
The control with ID 'UpdatePanel1' requires a ScriptManager on the page. The ScriptManager must appear before any controls that need it.
|
|
|
|
|
The ScriptManager control should be appearing first and then the UpdatePanel. Try placing the ScriptManager control above the UpdatePanel.
|
|
|
|
|
|
hi
i want to create an ASP.NET application that one of it's part is dictionary.
in this part i want to get user's word and send it to the a dictionary web page and after translate
with this dictionary (site),i want to get result and show it in the my web application.
finally how can i related between my web application and other sites or web pages???
in other word, how can programmatically post user's data to other web page and get result?
tanks
|
|
|
|
|
You need to use the services provided by other web sites
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... "
|
|
|
|
|
The easiest way would be to look for a web service to do this, but otherwise you will have to use some kind of screen scraping. Do a google search for screen scraping in asp.net and you should find plenty of articles.
If you do decide to use web services i have used
http://services.aonaware.com/DictService/DictService.asmx[^]
|
|
|
|
|
iam using iframe in that iframe i loaded an html file .now i want the source code of that html page.for this iam using iframe.document.body.innerHTML.for that iam getting only the code from tobut there was a java script in that page.but iam not getting the fullcode from to
.how could be possible
|
|
|
|
|
just u want to view source code of ur html page.
Devjit
|
|
|
|
|
yes sir complete source code of the page which i loaded in the iframe.plz help in this regard
|
|
|
|
|
Tru to use this u will get.
function viewSource()
{
d=window.open();
d.document.open('text/plain').write(document.documentElement.outerHTML);
}
Devjit Das.
|
|
|
|
|
thanks u sir its working.m getting complete source code.
|
|
|
|
|
sir frame1.document.documentElement.outerHTML the complete code is comming ,but now i want i click a button preview
the html page should come how copuld be possible
|
|
|
|
|
hi frindz
i have problem n need ur help
i am developing an application with asp.net along with c#.net using sqlserver2005 as db
i want to add a image in the database.
maeans i want to keep the path of image from where it is updated.and want to keep the
image in seperate folder with iin the application name image.
can you tell me what wil be code to " upload a picture in my application and then store the path name in the db and the image in a seperate folder inside my application"
thanks in advance
biswa007
|
|
|
|
|
Hi
Just use File upload control that will upload the image that you want to update.
Regarding the file path FileUpload1.PostedFile.FileName will give you full path path of file from client machine
Google the subject you will find more articles on this topic
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... "
|
|
|
|
|
this will help, you to upload image........
and Store the path in database
protected void Button2_Click(object sender, EventArgs e)
{
string sSavePath;
string sThumbExtension;
int intThumbWidth;
int intThumbHeight;
sSavePath = _Default.fullpath;
sThumbExtension = "_thumb";
intThumbWidth = 160;
intThumbHeight = 120;
// If file field isn’t empty
if (FileUpload1.PostedFile != null)
{
// Check file size (mustn’t be 0)
HttpPostedFile myFile = FileUpload1.PostedFile;
int nFileLen = myFile.ContentLength;
if (nFileLen == 0)
{
lblOutput.Text = "No file was uploaded.";
return;
}
// Check file extension (must be JPG)
if (System.IO.Path.GetExtension(myFile.FileName).ToLower() != ".jpg")
{
lblOutput.Text = "The file must have an extension of JPG";
return;
}
// Read file into a data stream
byte[] myData = new Byte[nFileLen];
myFile.InputStream.Read(myData, 0, nFileLen);
// Make sure a duplicate file doesn’t exist. If it does, keep on appending an
// incremental numeric until it is unique
string sFilename = System.IO.Path.GetFileName(myFile.FileName);
int file_append = 0;
while (System.IO.File.Exists(( (sSavePath + sFilename))))
{
file_append++;
sFilename = System.IO.Path.GetFileNameWithoutExtension(myFile.FileName)
+ file_append.ToString() + ".jpg";
}
// Save the stream to disk
System.IO.FileStream newFile
= new System.IO.FileStream((sSavePath + sFilename),
System.IO.FileMode.Create);
newFile.Write(myData, 0, myData.Length);
newFile.Close();
// Check whether the file is really a JPEG by opening it
System.Drawing.Image.GetThumbnailImageAbort myCallBack =
new System.Drawing.Image.GetThumbnailImageAbort(ThumbnailCallback);
Bitmap myBitmap;
try
{
myBitmap = new Bitmap((sSavePath + sFilename));
// If jpg file is a jpeg, create a thumbnail filename that is unique.
file_append = 0;
string sThumbFile = System.IO.Path.GetFileNameWithoutExtension(myFile.FileName)
+ sThumbExtension + ".jpg";
while (System.IO.File.Exists((sSavePath + sThumbFile)))
{
file_append++;
sThumbFile = System.IO.Path.GetFileNameWithoutExtension(myFile.FileName) +
file_append.ToString() + sThumbExtension + ".jpg";
}
// Save thumbnail and output it onto the webpage
System.Drawing.Image myThumbnail
= myBitmap.GetThumbnailImage(intThumbWidth,
intThumbHeight, myCallBack, IntPtr.Zero);
// myThumbnail.Save((sSavePath + sThumbFile));
Image1.ImageUrl = @"~\" + (string)Session["user_name"].ToString() + @"\" + sSavePath + sFilename; //+ sThumbFile;
//Directory.GetCurrentDirectory() + @"\" + sThumbFile;
// Displaying success information
lblOutput.Text = "File uploaded successfully!";
TextBox3.Text = @"~\" + (string)Session["user_name"].ToString() + @"\" + sSavePath + sFilename;// sThumbFile;
// Destroy objects
myThumbnail.Dispose();
myBitmap.Dispose();
}
catch (ArgumentException errArgument)
{
// The file wasn't a valid jpg file
lblOutput.Text = "The file wasn't a valid jpg file.";
System.IO.File.Delete(sSavePath + sFilename);
}
}
}
public bool ThumbnailCallback()
{
return false;
}
and read in this way
Read image from database[^]
|
|
|
|
|
Assalam-0-Alaikum,
hru? well in .Net 2.0 there is a file upload control. put it on ur .aspx page. In code behind file
provide its id and press a dot(.). Now the real fun starts here.
--- to get file name :
dim fileName As String = FileUpload1.PostedFile.FileName
then u can use this string fileName to save it in the database using inLine Query or Stored Procedure etc. If u have Problem Inserting data in the database, do let me know. i would write u know how to do this.
-- to Save file in the specified Location:
FileUpload1.PostedFile.SaveAs("Location as string")
there are other properties and method for the fileupload control tht u could use but depend on the requirement.
Hope it Helps.
Regards.
Atif Ali Bhatti.
Software Engineer.
Esoul Consultancy Pvt. Ltd.
|
|
|
|
|
hai i am using the file upload control indotnet as told by you.but here i want store the path of the image where it woulb stored not where it was stored.
accaording 2 ur soln it stores the the path of the image from where it upload the image...so can u solve it.
|
|
|
|
|
Assalam-0-alaikum,
yes i would tell u. look its u who will decide where to store the file. like,
fileupload1.postedfile.saveas("c:\myweb\images\image1.jpg")
now save the same path in the database i.e., c:\myweb\images\image1.jpg
now Question arises how to differentiate files. give them a unique name.
now how to give a unique name? there are so many ways but how do i save is, i create a folder with the username, save the file and name it with the username concatenated with some other patameters to make it unique.
hope u get it.
Regards.
Atif Ali Bhatti.
Software Engineer.
eSoul Consultancy Pvt. Ltd.
|
|
|
|
|
I have a textbox and Button Search in the site A. When I input data in the TextBox and then click Button Submit I have data of Textbox input. However, when I use variable in the textbox of site A for site b then I meet error. If you know, tell me to process please,
thanks
RICHING MINDS,CHANGING LIVE
|
|
|
|
|
Hi phuhoa
In ASPX, variable not stored in a long time. Just whene the page is created. To use long life variable use session (however in default just 20 minuites).
Like the example:
First, store your variable
Session("textbox1") = textbox1.text
To retrieve it
textbox2.text = Session("textbox1")
Hope it is usefull for you.
|
|
|
|
|
I am confused can you tell me What is Site A and Site B
If both are different web application then pass the value in query string if you don't know how to pass the query string please google it
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... "
|
|
|
|
|
Hi Sandeep, Hi phuhoa
Query string is also a nice choice to "transfer" the variable. However, it is not really safe, when we deal with the security.
Let us follow the sample:
Me.TextBox1.Text = Request.QueryString.Get("prevpage").ToString
*Change the prevpage with the value of previous page.
Regards,
Riza Azmi
(rizaazmi@yahoo.co.id)
|
|
|
|
|
Yes its not Secured but i think in his application that is not main concern
as it is the value that user is going to enter i don't think it will cause any trouble or security concerned . If you change the the quesry string then result will different just simple
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... "
|
|
|
|