|
Hi friends
i have button below in username.if i click the button the popup window appear
i have two button and one textbox in that popup window page
buttons are
1.check avilability
2.make this is my username
if i click the check avilability button that time check avilability button is disappear at that time make this is my username button appear vice versa
i write the code in codebehind using
check avilability.visible=true
make this is my username.visible=false
but page refreshed
i need the page did not refresh
how can i achive this
regards
saravanan
|
|
|
|
|
Dear saravanan,
you can use javascript instead of tht code in the code behind file
select a particular element and then you can set visible =false.
its like
document.getElementById('element_id').visible=false;
All The Best
Sathesh Pandian
|
|
|
|
|
when will session get start for HTML and ASP.NET?
D.Willington
|
|
|
|
|
A session starts every time a user without a session id cookie requests a page, unless of course the page is session-less.
---
single minded; short sighted; long gone;
|
|
|
|
|
Hi, I have read an article by Kelum Ganegoda on reading blobs. In his article he showed how to display images that were stored in blobs using the ExecuteScalar() method of the SqlCommand class which returns an object. So we cast it and store in a byte array like this.
byte[] _buf = (byte[]) _cmd.ExecuteScalar();
Then, stream it back to the HTTP response. The problem is that his article shows how to display images not text files. I'd like to display text files in the same format as the original files prior to being sent to the database. How would I go about doing that? Thank you in advance for your help.
-- modified at 23:18 Thursday 21st June, 2007
|
|
|
|
|
Exactly the same way, except that you use a different content type.
---
single minded; short sighted; long gone;
|
|
|
|
|
What about the format of the file, how do I get the format of the displayed file to be the same as the original file? Thanks
|
|
|
|
|
Hello!
I have this sql statement below:
Dim strSQL As String = "SELECT EmailAdd from vwDepList where Member_ID =' " & dropAssigned.SelectedValue & "'"
I want that my lblEmailAdd.text will refelect the value of strSQL depending on the dropAssigned.SelectedValue.
Need a tutorial. Thanks.
|
|
|
|
|
I am C# guy so I will write in C#. You can translate it into VB.NET
lblEmailAdd.text = GetEmail(dropAssigned.SelectedValue)
private String GetEmail(String memberID)
{
SqlCommand command = _Connection.CreateCommand();
String SQL = String.Format("SELECT EmailAdd from vwDepList where Member_ID
= '{}'",memberID );
command.CommandText = SQL;
command.CommandType = CommandType.Text;
SqlDataAdapter adapter = new SqlDataAdapter();
adapter.SelectCommand = command;
DataTable table = new DataTable()
adapter.Fill(table);
string email = (string)table.Rows[0];
return email.
}
Above _Connection is the SqlConnection to database.
Hope that helps.
|
|
|
|
|
hai everyone
i want to add activexobject("WScript.Shell") in my aspx page
plz tel me step by step
thanks
Dhatchinamoorthy.R
9894824838
|
|
|
|
|
Do you want to run this object on the server, or the client ? If the server, why ? If the client, it has nothing to do with ASP.NET, you need to do it using javascript, if that's possible. It doesn't seem likely to me.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I have a GetData methd which is returning a table using
> sqldataadapter. I bound that datasource with GridView but now I want
> to invisible Gridview's first column but it gives me following error
> although I have 5 columns in my datatable.
> Index was out of range. Must be non-negative and less than the size of
> the collection.
> Parameter name: index
> GridView1.DataSource = GetData();
> GridView1.DataBind();
> GridView1.Columns[1].Visible = false;
> Thanks for help me in advance
seema
|
|
|
|
|
Hi,
When you add grid view, to bind it to datasource, the best practice is below:
Click on the property builder (the little black arrow comes up when you click on GridView):
-->Add New Column:
-->Choose field type = bound Field
-->HeaderText = your choice
-->DataField = "The name of the column in your datatable.
Now go to GridView property:
AutogenerateColumns = False
Doing the above you won't have to hide any columns, you will see what you have decided. If you are worrying about the primary key, set that in the "DataKeysNames":
DaatKeysnames = (ColumnName from your DataTable) "PrimaryKeyColumnName"
Hope that will solve your problem.
Cheers.
|
|
|
|
|
Sir greetings again...
i appreciate everyones kindness..
and again i need your help..
i have this issue on setting or getting/displaying the client date time. coz everytime i access my sample application which i stored from the server, it fires me the server date and time settings...
my question is, how to set/get/display the client date and time instead of the server time?
anyone can help, and anybody's help and kindness is highly appreciated....
thank you and more power to us guyz......
start a new beginning in every ending; thats what life for......
|
|
|
|
|
I don't think it's possible, unless you're somehow able to work out their timezone ( using geoip ) and work out the time from there ( which may not be the time their PC is showing ). This is why most web sites ask you what timezone you are in, because they can't work it out for themselves.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Use Javascript to get the client time:
vad d = new Date();
---
single minded; short sighted; long gone;
|
|
|
|
|
Hi
i'd like to know how can i get fields values of DetailsView control.
I don wanna write connection, command,... codes
i like to put 1 sqlDataSource and DetailsView on my page to look for a record
then put the data to some labels around my page by getting DetailsView's fields values.
Thank you
|
|
|
|
|
found it!
in GridView it's like this:
grvExpenditure.Rows[index].Cells[ColumnIndex].Text
|
|
|
|
|
I have an aspx page in a project that was recently converted from VS 2003 to VS 2005. The page contains a UserControl which is located w/in the same application. Here's the file structure:
/includes/parent1/parent2/EditProfile.aspx
/includes/utils/StateDropDown.ascx
And I am getting the following error message from the VS compiler (not from the web because I can't compile the site): The virtual path '/includes/utils/StateDropDown.ascx' maps to another application, which is not allowed.
The project is file based, not http or ftp and there are no virtual directories in the project, so all directories w/in the project are in the same application. Why am I getting this error, and how can I fix it? Please help!
I've looked all over the web and all the related topics seem to relate to dynamically loading UserControls. The UserControl in question is added to the ASPX page using:
<br />
<%@ Register TagPrefix="uc1" TagName="StateDropDown" Src="/includes/utils/StateDropDown.ascs" %><br />
Thanks,
Mark
-- modified at 17:37 Thursday 21st June, 2007
|
|
|
|
|
Put a ~ at the front of the path, this maps to your application root. Or, use a relative path.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I have a GetData methd which is returning a table using sqldataadapter. I bound that datasource with GridView but now I want to invisible Gridview's first column but it gives me following error although I have 5 columns in my datatable.
Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
GridView1.DataSource = GetData();
GridView1.DataBind();
GridView1.Columns[1].Visible = false;
Thanks for help me in advance
seema
|
|
|
|
|
You must have called the code for making it "visible=false" before the gridview being bound to the datasource
put if(gridview1.rows.coun>0)
{
control.visible=false;
}
It should work.
I was born dumb!!
Programming made me laugh !!!
--sid--
|
|
|
|
|
What's wrong in the following statement.
if ((Convert.ToInt32(e.Row.Cells[2].Text)>=15))&& (Convert.ToInt32(e.Row.Cells[2].Text)>=17))
seema
|
|
|
|
|
seemamltn wrote: ((Convert.ToInt32(e.Row.Cells[2].Text)>=15))&&
You have an extra bracket, it is suppose to be if ((Convert.ToInt32(e.Row.Cells[2].Text) >= 15) && (Convert.ToInt32(e.Row.Cells[2].Text) >= 17))
|
|
|
|
|
The syntax error comes from mismatching parentheses.
What's really wrong about the statement, is that if the value is >= 17, then it always is >= 15, so half of the code is totally superfluos.
if (Convert.ToInt32(e.Row.Cells[2].Text) >= 17)
---
single minded; short sighted; long gone;
|
|
|
|