|
Hi All,
I want to attach Multiple files while sending EMail through SMTP. The files should be attached in a single click and I need the Fully Qualified path of the file .I have used ASP.NET File Upload control . I have implemented the functionality in thid way: Clicking on the browse in FileUpload control attaches a file. And there I have another link button "Attach another file" for attaching another file. All the files that have been attached will be displayed in a CheckBoxList.
But, I want to Browse and attach files in a single click just like GMail.
Please suggest me as to how to implement this. Can I use any Java Script for this.
archie
|
|
|
|
|
gmail uses AJAX to upload the file right away. Beyond that I don't see how your code would be any different. Press the button, select the file, and it gets uploaded when you send your form.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
Thank You for your reply.
Using File Upload attaches file once. And i need to add it to a checkboxlist in another button click. To attach another file, I am again clicking on "Browse" button in FileUpload click and to add it on the checkboxlist, I need to click on the Add button again. That means every time, according to my code, I am clicking twice. I want it in such a way that in a single click (in the BROWSE click of FileUpload Control itself),the file should be uploaded and added to the CheckBoxList.
archie
|
|
|
|
|
that can not be done. The browse button only allows you to browse files in the client machine. If you want to upload the file, you need to use AJAX, as Christian mentioned it above.
Yusuf
Oh didn't you notice, analogous to square roots, they recently introduced rectangular, circular, and diamond roots to determine the size of the corresponding shapes when given the area. Luc Pattyn[^]
|
|
|
|
|
I have a dll(Borland C++) that accepts a integer pointer and i have to pass an integer array into it. The integer array gets filled with values and i need to use these values in the ASP.NET project.
How do i do it???
|
|
|
|
|
These questions have nothing to do with ASP.NET. They relate to p/invoke and C# only.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
Hi,
Ok before giving any sueggstion, let me clear:
1. yr C# methode need to accept paramter frm c++ and also need to return some value to c++.
is this correct?
Please explain
Regards
Anil Pal
|
|
|
|
|
i am calling the dll from my ASP.NET project. so i am passing the integer array to the dll and i want it to be passed by reference. nothin is returned as such
|
|
|
|
|
Let me repeat what Christian told you. This has nothing to do with ASP.NET
Yes, you are using it from asp.net, but it is the function of C# you are looking for not asp.net
in any case look here[^]
p.s. Next time ask it in the right forum. This question is more appropriate in the C# forum
Yusuf
Oh didn't you notice, analogous to square roots, they recently introduced rectangular, circular, and diamond roots to determine the size of the corresponding shapes when given the area. Luc Pattyn[^]
|
|
|
|
|
i created an GridView and fill it using Dataset as datasource it's working fine, after that i want to provide filter for that GridData, so i place an dropdown control at the header column where i want to give filter for user, after that i want to fill that control and on selection changed event i want to refill the gridview control using that selected value as filter criteria, for this purpose i use grd_RowDataBound() event of "grd" where i use following code to fill that DropDown control "drp"
protected void grd_RowDataBound(object sender, GridViewRowEventArgs e)
{
try
{
if (e.Row.RowType == DataControlRowType.Header)
{
DropDownList _Drp = (DropDownList)e.Row.FindControl("drp");
DataView DV = (DataView)this.grdCurrency.DataSource;
_Currency.DataSource = DV;
_Currency.DataTextField = DV.Table.Columns["Column1"].ColumnName;
_Currency.DataValueField = DV.Table.Columns["Column2"].ColumnName;
_Currency.DataBind();
ListItem _item = new ListItem("All", "0");
_Currency.Items.Insert(0, _item);
_Currency.SelectedIndex = 0;
}
}
catch (Exception ex)
{
//show user friendly error.
}
}
and code for DropDown selected index change as following
protected void drp_SelectedIndexChanged(object sender, EventArgs e)
{
try
{
foreach (GridViewRow Row in this.grd.Rows)
{
DropDownList _drp = (DropDownList)this.grdCurrency.Rows[0].FindControl("drp");
string _C = _drp.SelectedItem.Text;
string _Filter = (string.IsNullOrEmpty(_C)) ? "[Column1] = '" + _C + "'" : string.Empty;
string filter = string.Empty;
filter = _Filter;
DataView DV = (DataView)this.grd.DataSource;
DV.RowFilter = filter;
this.grd.DataBind();
}
}
catch (Exception ex)
{
//show user friendly error.
}
}
but when i test this code i found the "grd_RowDataBound()" event fire and refill the DropDown control where as it should filter the data and refill the DropDown Control with the existing data as per the GridView Control.
i think the bubble event fire and refill the DropDown Control where as i want to Filter the Grid with the filter of drp control event and then refill the DropDown control with the data presented in that gridview.
please help me regard this thanks and regards.
Sasmi
|
|
|
|
|
hi experts
iam using url rewriting concept
iam passing some special characters to response.redirect( "ö");
when iam passing to the browser adress iam not getting the exact way that which the special character appears insted of it was getting in "%c3%b6
for example
see the down urls
http://localhost:1543/hungary/city-hotels-in-göd.aspx. this is the correct
but iam getting in this way.......
: http://localhost:1543/hungary/city-hotels-in-g%c3%b6d.aspx
plz solve this problem
to get the exact way as special charcter appeared
Regards
venu..
|
|
|
|
|
There is no cure for this level of ignorance.
The reason it's not working, is that what you want, cannot be done.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
so we cant redirect the urls in the exact way ?
|
|
|
|
|
No, you cannot use non ASCII characters in a URL, and even some ASCII chars, like &, will get encoded. That's how URLs work.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
Hi,
I have a regular expression for 9.108,00 i need the regular expression which should accept the format like 9,108.00
the regular expression which i am using is [+|-]{0,1}[\d]{1,}(\.\d){0,1}[\d]{0,}
Can anybody give the or modify the regular expression which should accepts the numbers in both the cases.
|
|
|
|
|
Here's an interesting question. What if someone types it in the German format, but they are in the US ?
Can't you see where your regex is looking for a dot ? It's (\.\d). Are you just using regex you find on the web, without bothering to learn how they work ? Replace the . with a group so that you will match one character with either a dot or a comma.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
Hi all,
I would like to upload file to server with encryption. The requirement is that the file should either encrypted first before being uploaded or it can be encrypted later on after being uploaded.
On downloading the file the file should be in the decrypted form.
I am using ASP.NET 3.5 with C#
Any help/suggestion will be appreciated.
Happy Coding,
Vivek Rathore
|
|
|
|
|
hi,
Can u know what kind of file u r going to upload?
Regards
Anil Pal
|
|
|
|
|
It's probably going to be easier to encrypt the file after sending it (but really not very useful). Is the same host downloading the file? Unless the same host that is downloading the file, you'll need to send some sort of encryption key.
This site will likely have all that you need to get started: http://www.devhood.com/Tutorials/tutorial_details.aspx?tutorial_id=489
A secure and useful method would be to open a secure communication using a public/private key pair and then the server could send an encryption code for the client to encrypt the file. The client would then send the encrypted file to the server and there the server could decrypt the file since it knows the encryption code.
That way is going to be a lot more difficult, but more practical.
Hope that helps.
|
|
|
|
|
Hi!!
All I am developing a site using ASP.Net I want to develop a site that generates textboxes,lables,tablecells at runtime ie is from database itself depending on the no of rows in the table in database. That is to get as many textboxes as there are rows in table. What I am doing right now is creating new text boxes in the code and then adding them to the cells and rows of the table control.All it is I am doing on PageLoad event. This all works fine.
The problem comes when I have to extract data from the form which is entered by user and insert into databse table onClick event of button. As it is in other function I am not able to access textboxes and its properties on that event function code. How do I get the properties of the controls generated in runtime and placed on the Table control?
while on click to get value code are as fallows
string Value = string.Empty;
Table tbl = (Table)Panel1.FindControl("table123");
for (int i = 0; i < NumberOfControl; i++)
{
TextBox txt = (TextBox)tbl.FindControl("DynamicTextBox" + i.ToString());
Value = Value + txt.Text + "";
}
Label1.Text = Value;
krishna veer singh
|
|
|
|
|
If you generate them after or during page load, they won't ever have viewstate. The best way to deal with this, is to store the text that's entered in a hidden control, perhaps as XML if you have many textboxes ?
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
Probably you are adding these dynamic control in another control like place holder or panel, in that case you must use search dynamic controls in that panel or place holder, like:
VB Code
-------
Me.Panel1.Controls.Add(txt1)
Me.Panel1.Controls.Add(txt2)
must be read like
Me.Panel1.FindControl(txt1) instead of Me.FindControl(txt1)
Hope this helps.
Be a part of solution, rather then be a part of problem
|
|
|
|
|
Hi friends,
In my application i want to send datas from one form to other using Querystring. I dont know how to send multiple datas. I send it seperated by comma. But it will be sended as a single data. the code is
xmlHttp.open("GET","ResponserFile.aspx?sendData=" + id,nam,cel ,true);
CAn anyone correct it?
|
|
|
|
|
use
ResponserFile.aspx?id=3&name=nam&cell=cell
Now from server side get the data using
Request.QueryString["id"]
Request.QueryString["name"]
Request.QueryString["cell"]
|
|
|
|
|
Hi, I write it as u mention. But it does not work.
xmlHttp.open("GET","ResponserFile.aspx?id=3&name=nam&cell=cell,true)
Can u correct it ? Pls..
|
|
|
|