|
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..
|
|
|
|
|
you are using a comma before true, this is not correct. The correct string will be like:
xmlHttp.open("GET","ResponserFile.aspx?id=3&name=nam&cell=cell&var=true")
in the above syntax id, name, cell, var are variables that will be called by:
Request.Querystring("id") etc....
& is user to join two variable so be careful to use values.
Be a part of solution, rather then be a part of problem
|
|
|
|
|
Hi,
Can i know frm where ur trying to send the query string vale?
Regards
Anil Pal
|
|
|
|
|
Actually i used it in Ajax. I send it to server side page for inserting datas in a table. I want to know how to send multiple datas? can u tell?
|
|
|
|
|
Hi
ResponserFile.aspx?id=3&name=nam&cell=cell
I think u r using correct format to send the multiple data through query. May be problem in syntax of calling in ajax.
Can u provide the exact error whcih u r receiving.
R u workking in VS 2003?
Regards
Anil Pal
|
|
|
|
|
Hi Karthick_gc,
Have you tried doing it like this:
xmlHttp.open("GET","ResponserFile.aspx?id=" + id + "&name=" + nam + "&cell=" + cel + "&bool=true");
I'm assuming that id, nam and cel are variables. Then to retrieve the data on the form you would use:
Request.QueryString["id"]
Request.QueryString["name"]
Request.QueryString["cell"]
Request.QueryString["bool"]
I hope this helps.
Ryan
|
|
|
|
|
Buy a book and read it, or learn to use google, instead of making stuff up.
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 )
|
|
|
|
|
|
Can anybody please tell me how to get youtube video url through asp.net.It can be done with php easily.but i am not able to do the same with classic asp.
|
|
|
|