|
Sonia Gupta wrote: which i am invoking at the form closing.
I have given a workaround for this issue in your another post ? Is that working ? check your previous messages on this issue
|
|
|
|
|
there was no such discussion in previous-post , pertaining to invoking of one funciton on more then one control or at form closing
Soniagupta1@yahoo.co.in
Yahoo Messenger Id = soniagupta1
|
|
|
|
|
Sonia Gupta wrote: there was no such discussion in previous-post , pertaining to invoking of one funciton on more then one control or at form closing
1 - Check this[^]
In this Guffa given the answer, what happened when tried that ?
|
|
|
|
|
Sonia Gupta wrote: button server control in aspx page, which i am invoking at the form closing
Sonia Gupta wrote: y it is happening?
You have a button, you click it in code when the form closes, and you're confused that the same thing happens when the form closes as when you click the button ? Have you bought a book yet ?
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Christian Graus wrote: Have you bought a book yet ?
I planning to present one for her
|
|
|
|
|
Hi Sonia
This is the simple one that if u call function on button click it will call. plz to check ur code and go through throughly. hope that u will get yourself.
Devjit
|
|
|
|
|
Did anyone clarify your problem?
Regards - J O H N -
|
|
|
|
|
I have application that uses navcond.js for menu. It works in IE but not in Mozilla.
I would really appreciate if you could let me know what needs to be done to mave the menu bar appear in Mozilla.
Thanks in advance.
kannan
kannan
|
|
|
|
|
how can i take only month from datetime variable
|
|
|
|
|
Hi,
U can use this.
DateTime dt = DateTime.Now; ;
string str = Convert.ToString(dt.Month);
Regrds
Lijo
|
|
|
|
|
|
Do u want in SQL?
Defeat the Defeat before the Defeat Defeats you.
|
|
|
|
|
Harun_asp.net wrote: how can i take only month from datetime variable
DateTimeObj.Month
|
|
|
|
|
i have one gridview in my application ihave filled my gridview with the values from database now i want title column to be hyperlink and when i click on this column value the file which is in the server system at the specified location i.e., feedback path to be downloaded in the client system
below is the code for filling gridview with database values
-----------------------------------------------------------
DataSet ds = new DataSet();
SqlConnection cn = new SqlConnection("Persist Security Info=False;User ID=sa;Initial Catalog=Mtlinecount;Data Source=Ms05");
SqlDataAdapter da = new SqlDataAdapter("select h.Sitename,Title,feedbackpath,Createddate from QAfeedbackDetails qa inner join hospital h on h.siteid=qa.siteid where qa.Siteid=h.siteid and createddate between '" + txtFromDate.Text + "'and '" + txtToDate.Text + "'", con);
da.Fill(ds, "QAFeedbackDetails");
gvFeedback.DataSource = ds.Tables[0];
gvFeedback.DataBind();
thank in advance for u r help
|
|
|
|
|
Use HtmlAnchor Tag if you want to download file.
try following code in ItemTemplate
<a href='<%# Eval("fieldName")%>'>Download</a>
please don't forget to vote on the post that helped you.
|
|
|
|
|
|
hi,
I am using the below coding to thumbnail creation, this coding is saving both the original image and the thumbnail image. I don’t want the original image. How to delete the original image. Please help me.
private void btnUpload_Click(object sender, System.EventArgs e)
{
// Initialize variables
string sSavePath;
string sThumbExtension;
int intThumbWidth;
int intThumbHeight;
// Set constant values
sSavePath = "images/";
sThumbExtension = "_thumb";
intThumbWidth = 160;
intThumbHeight = 120;
// If file field isn’t empty
if (filUpload.PostedFile != null)
{
// Check file size (mustn’t be 0)
HttpPostedFile myFile = filUpload.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(Server.MapPath(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(Server.MapPath(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(Server.MapPath(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(Server.MapPath(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 (Server.MapPath(sSavePath + sThumbFile));
imgPicture.ImageUrl = sSavePath + sThumbFile;
// Displaying success information
lblOutput.Text = "File uploaded successfully!";
// 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(Server.MapPath(sSavePath + sFilename));
}
}
}
public bool ThumbnailCallback()
{
return false;
}
prakash
|
|
|
|
|
You don't have to delete the file. Just don't create it.
Create a MemoryStream object from the byte array, and load the image from that.
jai 123 wrote: myFile.InputStream.Read(myData,0,nFileLen);
That's not a secure way to read the data. The Read method returns an integer that tells you how many bytes where actually read, and this can be less than the number of bytes requested. You have to loop until you have read all bytes, or until the value returned is zero.
---
"Anything that is in the world when you're born is normal and ordinary and is just a natural part of the way the world works. Anything that's invented between when you're fifteen and thirty-five is new and exciting and revolutionary and you can probably get a career in it. Anything invented after you're thirty-five is against the natural order of things."
-- Douglas Adams
|
|
|
|
|
Hi All,
Can any one tell me whts difference between ASP.NET 1.x and ASP.NET 2.x.
Thanks in Advance.
|
|
|
|
|
Respected All,
I have created 4-5 reports in asp.net with c#.
this all reprots r working fine on local host,.
but wn i have uploded tht reports some error is there in repot and its not working..
Error Reports r like:
---------------------------------------------------------------------------------
Server Error in '/fotoAlumamit/bk' Application.
Runtime Error
Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.
Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customerrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customerrors> tag should then have its "mode" attribute set to "Off".
<configuration>
<system.web>
<customerrors mode="Off">
Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customerrors> configuration tag to point to a custom error page URL.
<configuration>
<system.web>
<customerrors mode="RemoteOnly" defaultredirect="mycustompage.htm">
-------------------------------------------------------------------------------
sp please can anyone help me tht how can i fix tht error
or wt settings hv to be made in report viwer to mk thm enable online..
waiting for reply.
Thanx in advance.
Jigar Badgujar.
BeBadgujar
|
|
|
|
|
Hi all,
1. Is there any benefit in using login control when we are using our own database to store login creadentials.
2. Can we use our own database to implement roles
Thanks in advance...
|
|
|
|
|
hi all
In my application there several web pages the last page is payment page(credit card) which is a secure page that is its url is https. but when i click on any link to return to other pages its still shows https.
although all links accept the payment page is http. Then also it shows https once i visit the payment page and try to click a link for other pages.
so how to remove that https to http for other pages.
Pl help
Regards
Prakash Mishra(Banglore,India)
|
|
|
|
|
Prakash_Mishra wrote: but when i click on any link to return to other pages its still shows https.
Append http to the links present in that secure page instead of redirecting like /page.aspx
|
|
|
|
|
Thanks a lot
Prakash Mishra(Banglore,India)
|
|
|
|
|
You are using relative url i.e. "..\otherpages.asp" so after you visit the https page other consequent pages will be assumed to be of the same protocol will be used last (https).
Use absolute url (e.g. "http://www.codeproject.com/otherpage.asp" ) on the links of other pages.
Cheers
Raz
/*
Ghazi Hadi Al Wadi, PMP, ASQ SSGB, DBA
*/
|
|
|
|