|
Good Day
Put a Break point in your text-changed event and Debug it. please Post your code in the text-changed event and maybe we can help you there.
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
is it good practice to store dataset in session.
|
|
|
|
|
No, but it is a good practice to read this[^], look at #3
only two letters away from being an asset
|
|
|
|
|
Sneha Bisht wrote: is it good practice to store dataset in session.
It Depends on the size of DataSet. What you are going to store in DataSet ? If this is normal user information its always better to use in normal variable rather than dataset.
As per the data size of concern try to avoid dataset, datatable to store in session.
|
|
|
|
|
Datasets Are Expansive.
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
Usually you'd store an id in the session and use that to define what dataset you need to get from the database.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Respected,
Add Calender Control In Asp.Net GridView Control without PostBack The Page
|
|
|
|
|
Sorry, did you have an actual question ?
I THINK you want to know how to add a calendar control that doesn't do a postback when you select. Just find a javascript one online and put it into your page.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
|
Hi,
I am using Text file. Using StreamWriter I am writing some line in the file.
Then I close that file using StreamWriter.Close()
After the closing the file. I am again opening the same file for reading purpose.
I read some data for checking and again write into the same file using StreamWriter. At that time is showing me error "Cannot write to closed Textwriter".
I want to use the same file for writing.How can i do?
Thanks
Sjs
|
|
|
|
|
This has nothing to do with ASP.NET. Create a new streamwriter, apparently you can't reopen one you closed.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
hi,
I dont know which framework are u using? but if u r using framework 3.5, I recommed u to use the streamreader and streamwriter objects in using keyword e.g.,
using (StreamWriter sw = new StreamWriter(path))
{
sw.WriteLine("This");
sw.WriteLine("is some text");
sw.WriteLine("to test");
sw.WriteLine("Reading");
}
using (StreamReader sr = new StreamReader(path))
{
while (sr.Peek() >= 0)
{
Console.WriteLine(sr.ReadLine());
}
}
Hope this helps.
Regards,
Atif Ali Bhatti.
|
|
|
|
|
i have hide a div using jquery like $("#div1").hide(); in $(document).ready{};
when mypage loads this div shows once then hide.
One person's data is another person's program.
--J.Walia
|
|
|
|
|
I guess the code takes a second to run. If you want it hidden on load, hide it in the code behind.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
hi,
if u want the div to be hidden on page load, good thing will be to add
style="display:none;" to the div.
e.g.,
<div id='div1' style="display:none;">your content here.</>
and later u can show it by using $('#div1').show();
Regards.
Atif Ali Bhatti
|
|
|
|
|
thanks for reply
i will try this
One person's data is another person's program.
--J.Walia
|
|
|
|
|
I completed my personal web page. and I hosted that in a free webhosting site. Now my Problem is
1. How to show my web page content topmost in Search Engine like Google, Yahoo, Msn etc...
2. I m searching my website name then also i can't search in any above search engine.
|
|
|
|
|
|
non-bugging Errors wrote:
1. How to show my web page content topmost in Search Engine like Google, Yahoo, Msn etc...
Pay them. Modern search engines are not as easy to fool, and if there is a way, you'd use it today and someone else would use it to be above you tomorrow.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
im using repeater control retrieving a table with four rows from sql.
one column is to active or inactive the users, when i click on linkbutton to active or inactive single user all users are activated or deactivated.
following is the code....
in sql table i had column active with values '1'(active) and '0'(inactive)
help me what im missing or any sample code....
in repeater item command
if(commandname=="inactive")
foreach (DataRow row in dt.Rows)
{
if (row["Active"].ToString() == "0")
{
update tb_staff set Active=1 where Active=0
}
if (row["InActive"].ToString() == "1")
{
update tb_staff set Active=0 where Active=1
}
}
|
|
|
|
|
Hi,
You have to update the table with 'update tb_staff set Active=0 where ID=command argument'. Please send the id of the corresponding record to the link button as commmand argument.
|
|
|
|
|
table with columns id, username, pwd, active, email
update table tb_staff set active=1 where active=0
how should i give command argument as link id in query..
|
|
|
|
|
How did you bind the repeater control.Have you used #Eval("id") or databinde r.use the same in the linkbutton.
<asp:linkbutton id="lnkbtnactive" text="Active" commandargument='<%#Eval("id")%>' commandname="xxx" runat="server">
at the codebehind ,
Use item command method to get the commandargument(e.commandargument).you can now get the id.Now you can update the table.Why you have written the query in the page itself.Please prefer to write stored procedures.
|
|
|
|
|
now its completely not workin
if (e.CommandName == "act" && e.CommandArgument=="StaffId")
{
DataSet ds = new DataSet();
DataTable dt = new DataTable();
OleDbDataAdapter ad = new OleDbDataAdapter(cm);
ad.Fill(ds, "tb_staff");
dt = ds.Tables["tb_staff"];
foreach (DataRow row in dt.Rows)
{
if (row["Active"].ToString() == "1")
{
SqlCommand cmd = new SqlCommand("update_staff_active", cnn);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.Add("@StaffId", SqlDbType.Char).Value = "StaffId";
cmd.Parameters.Add("@Active", SqlDbType.Char).Value = "active";
SqlCommand cmd = new SqlCommand("update_staff_active", cnn);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.Add("@StaffId", SqlDbType.Char).Value = "TextBox1.Text";
cmd.Parameters.Add("@Active", SqlDbType.Char).Value = "TextBox2.Text";
cnn.Open();
cmd.ExecuteNonQuery();
cnn.Close();
}
}
}
procedure
create PROCEDURE [dbo].[update_staff_active]
(
@StaffId int ,
@Active [char]
)
AS
update tb_staff
set
Active=@Active
where
StaffId=@StaffId
|
|
|
|
|
hi,
you will have to find the row no of that row and then use query
|
|
|
|