|
Hi All,
i Have made a web application, working fine in WINDOWS and MAC, but in my application i have a file upload option by which, user can select file and upload it on server.
For this i use openfiledialog to select files and use filter to filter only allowed file types in selection.
the filter is like :
dlg1.filter=Files Allowed(*.pdf;*.doc;*.docx;*.txt;*.xls;*.xlsx;*.ppt;*.pptx;*.bmp;*.jpg;*.jpeg;*.gif;*.tif;*.tiff;*.png)|*.pdf;*.doc;*.docx;*.txt;*.xls*;*.xlsx;*.ppt;*.pptx;*.bmp;*.jpg;*.jpeg;*.gif;*.tif;*.tiff;*.png"
Now it is working fine but
in MAC i m unable to pick excel files, excel files not available in allowed types, all though .xls and .xlsx is been added into filter and working for windows.
so what changes required in filter for MAC machine.
Thanks
Yogesh Agarwal
|
|
|
|
|
yogesh_kumar_agarwal wrote: docx;*.txt;*.xls*;*.xlsx;*.ppt
In your filter, its written: *.xls*;
I guess, it should be: *.xls;
|
|
|
|
|
|
Cool.
|
|
|
|
|
I want to send mail from an asp page. The asp page is called from a html page. The sending mail using CDOSYS and CDO is not working properly. When i call the asp page from html page, the script for sending mail in the asp page is getting displayed while running rather than working of the process which i had mentioned in the script to work.
The runtime problem is that, when the asp file is being called from html file the script is getting displayed rather than the process to get worked.
HTML Code
HTML and CSS Syntax (Toggle Plain Text)
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
</head>
<body>
<form action=sendmail.asp method="POST">
<p><input type="text" name="T1" size="20"></p>
<p><input type="submit" value="Submit" name="B1">
<input type="reset" value="Reset" name="B2"></p>
</form>
</body>
</html>
ASP File "sendmail.asp" code
*****************************
HTML and CSS Syntax (Toggle Plain Text)
<html>
<head>
<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<%
function sendmail()
{
Set myMail=CreateObject("CDO.Message")
myMail.Subject="Sending email with CDO"
myMail.From="rksvidhya@yahoo.com"
myMail.To="swornavidhya.mahadevan@gmail.com"
myMail.TextBody="This is a message."
myMail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtsperver") = "smtp.gmail.com";
myMail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 465;
myMail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2;
myMail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate")= 1;
myMail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = "true";
myMail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusername") = "swornavidhya.mahadevan@gmail.com";
myMail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "************";
myMail.Configuration.Fields.Update
myMail.Send
set myMail=nothing
response.write("<script> alert('Process Successful.')</script> ");
}
%>
</head>
<body>
</body>
</html>
Kindly help me at the earliest.
M.Sworna Vidhya
|
|
|
|
|
Hi,
You've created the function sendmail(), but never call it to execute. Either pull the code out of function and let it process as the page is processed, or add a call to the function at the end of your script block.
|
|
|
|
|
Hi all,
I have a dropdownlist into a detailsview under vb.net (asp.net) and I want controller when user is in mode "insert" or "edit" this dropdownlist for enable or disable a textbox (into detailsview also) depending of value of dropdownlist.
Without detailsview is easy, put dropdownlist in mode postback and I controller .value but with detailsview I don't know how controller it.
Any idea?
thanks very much.
|
|
|
|
|
I have an aspx page. In that page I am displaying div when click on link. Div contains iframe and i am assigning url to the frame like below.
<asp:linkbutton id="lkbtn" text="Create" onclientclick="return ShowDiv(this)" runat="server">
// Function to Show the Div //
function ShowDiv(CtrlName)
{
document.getElementById('divUserCtrl').style.display = 'inline';
frames['ifrm'].window.location = "CreateProject.aspx?ProjCat=G";
return false;
}
when click on linkbutton can able to display div and redircting to CreateProject page. But in CreateProject when click on a button i need to close this div. How can I do this in c#. I tried like Page.RegisterStartupScript("Reload", "window.close();"); But no luck
|
|
|
|
|
First, please remember to format any code you post using the pre tags as explained in the forum guidelines.
Second, follow the advise given. This is a cross post and since you have not indicated that will most likely just get ignored, at best.
Your experience here will be more gratifying if you learn to follow the rules and listen to advice.
You can't close it from c#. You will need to have the page being displayed in the iframe call javascript method to close the containing div.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Button is in one 2.aspx page and frame in 1.apsx. How can I Close frame in 1.aspx from 2.aspx. My subject itself mentioned close frame in javascript not in c#.
|
|
|
|
|
SatyaKeerthi15 wrote: My subject itself mentioned close frame in javascript not in c#.
From your original post:
"How can I do this in c#. I tried like Page.RegisterStartupScript("Reload", "window.close();"); "
How much control do you have over the page being displayed in the frame? Is it your, or are you lining to another site?
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Hi,
i have a master page and has some menu items, i am handling its
ClientClick event using Ajax. if i want handle the ClickClick
event on content page, then how can handle it at content page?
Actually clicking of menu set the visibility of buttons, and buttons are in
content page. so i wanted make it at client side without triping.
|
|
|
|
|
If you want the event handler of Control present in master page, in your content page, you can go do something like this:
protected void Page_Init(object sender, EventArgs e)
{
Button btn = (Button)this.Master.FindControl("btnMaster");
if (btn != null)
btn.Click += new EventHandler(btn_Click);
}
protected void btn_Click(object sender, EventArgs e)
{
Response.Write("Button Clicked.");
}
where btnMaster is a Button in Master Page. I guess you need to do the same for Menu Item.
amit_83 wrote: so i wanted make it at client side without triping
If you want to do it in client side, there is no concept of master and content page. Try with some javascript based on the client side code it generated.
|
|
|
|
|
hi,
i was added two template fields in Grid view one="Drop Down List" two="Text Box",here i need to disable text box while Drop_down_on_Change event with some selection Fields only ,my requirement is like,
"Drop Down List" has two items , one is "Country" and Second one is "State",
if user Select country in Drop Down then Text box should be disable false else Text box should be disable True (i need client side code).Please suggest me better way to fix.
Thanks & Regards,
Vishnu.
|
|
|
|
|
Hi Guys i have a data format like this format...,
<table>
<tr><td>Head1</td><td>Head2</td><td>Head3</td></tr>
<tr><td colspan='3'>some value</td></tr>
<tr><td>value1</td><td>value2</td><td>value3</td></tr>
<tr><td>value1</td><td>value2</td><td>value3</td></tr>
<tr><td>value1</td><td>value2</td><td>value3</td></tr>
<tr><td colspan='3'>some value dasfs</td></tr>
<tr><td>value1</td><td>value2</td><td>value3</td></tr>
<tr><td>value1</td><td>value2</td><td>value3</td></tr>
</table>
Now i want to export the values to .CSV format...,
In lower version of .CSV(2000) its showing datas properly...,
the same thing if i open in 2007 CSV format...,
i am getting the records how i mentioned in above(table) the sme way i am getting (i.e) with table...,
this is my code:
string strData = "<table>.......</table> //the above table format i given here
Response.Write(strData);
byte[] data = ASCIIEncoding.ASCII.GetBytes(strData);
Response.Clear();
Response.ContentType = "text/csv";
Response.AddHeader("content-disposition", "attachment;filename=" + _UserID + "Stock" + DateTime.Now.Second.ToString() + DateTime.Now.Millisecond.ToString() + ".csv");
Response.BinaryWrite(data);
Response.End();
plz help me regards this...,
Thanks & Regards,
Member 3879881,
please don't forget to vote on the post
|
|
|
|
|
I don't see where you said what the actual problem is.
There is no such thing as CSV2000 or CSV2007. CSV stands for comma separated values. It is a text file. HTML is not CSV. Telling an application you are giving it CSV data when you are actually giving it HTML would definitely lead to unpredictable results. If you want to save as CSV then do the parsing to actual produce CSV. Load your HTML into either an HTMLTable object or an XMLDocument object and create a proper CSV. Since you are not using the proper quotes for your attributes it may be a little tricky
|
|
|
|
|
((parentPage)Parent.Page).callChildMethod();
As above i called a method which assigns parent control Label to new values from user control server side page, i debug the code and it showed me the value is changed correctly which is to be, when the method call gets over it comes inside the user control again and leaves the User control but when the page doesnot showing the changed values unless we give click on the parent page to load again.
Method inside Parent .aspx.cs Page which Holds User Control
public void callChildMethod()
{
Label1.text="value";
}
Above Label Value gets changed when i call method but the page not getting refreshed to show the new values.
|
|
|
|
|
Hi!
AFAICT, you are approaching the problem in the wrong way.
If you refresh the child control it's via async postback. This means that the browser will refresh only the area associated with the control. IT WILL NOT REFRESH parent controls.
What you see is being updated is the server side counterpart of the parent control's label, which is reconstructed over and over by asp.net at each partial postback.
If you want to update the parent control's label, you should probably do it via javascript and ClientScriptManager (if you are already using Ajax extensions).
I hope this can clarify you what's actually happening!
Bye
|
|
|
|
|
hi
Yes, i agree can you give me some example how can we do that .,
|
|
|
|
|
Hi everyone,
I have one question I can't seem to find an answer for...
Is there a simple way to ensure an aspx file deployed to a remote server has not been modified?
I'm thinking of something a bit like strong name signing: a way to detect at run time if the aspx file has been modified after deployment.
I mean: I can compile every aspx.cs file into a dll and sign the resulting file, but it seems I cannot do something similar with aspx files.
Thank you all in advance.
Alberto
|
|
|
|
|
When you pre-compile the application the code behind and aspx files placed into the assembly, there are aspx files also but they are merely placeholders (even says so in the file)
If you have are worried about someone changing the aspx after deployment then I think you have other concerns that need to be addressed first.
I know the language. I've read a book. - _Madmatt
modified on Wednesday, September 1, 2010 1:44 PM
|
|
|
|
|
Mark Nischalke wrote: When you compile the application the code behind and aspx files placed into the assembly, there are aspx files also but they are merely placeholders (even says so in the file)
IIRC that is a build option and not the default option?
|
|
|
|
|
Correct, I should have clarified that.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Thank you Mark and Ennis!
Yes, I know that I have a lot of things to watch for before.
In fact, taking care of them is my current concern.
I was simply investigating if it's possible to secure this particular aspect of a webapp.
Thank you much for answering to my question.
I think I can't find the exact option you two are referring to; could you tell me how it's called (I should probably RTFM, I know).
Thank you much!
|
|
|
|
|