|
try following code
txtValue.Attributes.Add("Value",SelectedDateHere);
bEst rEgard
pAthan
please don't forget to vote on the post that helped you.
|
|
|
|
|
ReadOnly means just that: Read ONLY. So you cannot assign a value to a read only field. You can only read from it. Only read ... read only ... you know.
Cheers,
Mircea
"Pay people peanuts and you get monkeys" - David Ogilvy
|
|
|
|
|
It is terrible that sonia gupta has not post any query yet. So plz u people tell her to put some query.
Devjit Das.
|
|
|
|
|
hey man u r so wary about soniya gupta any mistry behind this.
Piyush Vardhan Singh
|
|
|
|
|
Nothing but like her query and ask again and again.
Devjit Das.
|
|
|
|
|
OOOOOOOOh this is the reason i think some thing else. but i think she is fresher in this field and fresher always face these thing.
Piyush Vardhan Singh
|
|
|
|
|
|
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.
|
|
|
|