|
Do not re-post[^]!
Wait for people to reply.
..Go Green..
|
|
|
|
|
|
i'm using sessions. but it is not working or i am tellign that session is not storing the value....
|
|
|
|
|
|
I have created a gridview with 2 template fields created at design time. I want to generate more template fields(gridview columns) dynamically at runtime,because no. of columns in the gridview is varying every time.I also need to have a textbox inside every template field.
I have done up till generating these template fields along with the textboxes using ITemplete and I can also get these textboxes at the RowDataBound event. Then I am allowing the user to update the values in the textboxes. But when I try to get these textbox values on click event of the submit button which is outside the gridview, I can't find those newly generated columns and hence neither the textboxes.
Can anyone please help me to find out the solution to this so that I can get the textbox values on submit button's click event.
Thanks.
|
|
|
|
|
|
Thanks for the help.
I got the solution. I just had to remove the IsPostback() condition which I was checking on Page Load.
|
|
|
|
|
I have two grids.say Parent_Grid and Child_Grid. When ever I am inserting a record in the Parent_Grid one empty row with all value '0' should add in Child_Grid..how to achieve this?
|
|
|
|
|
In ItemCreated event of Parent_Grid you can create a row in the childGrid
|
|
|
|
|
Please suggest a tutorial for rdlc in visual studio 2008 web application
|
|
|
|
|
|
SqlCommand cmd;
SqlDataReader rdr1;
int i;
cmd = new SqlCommand("Select * from tblTest where [Check]='False'",con1);
rdr1 = cmd.ExecuteReader();
if (rdr1.HasRows)
{
while (rdr1.Read())
{
cmd = new SqlCommand("Insert into tblTest values('" + rdr1[0].ToString() + "','" + rdr1[1].ToString() +"','" + rdr1[2].ToString()+ "')", con2);
i = cmd1.ExecuteNonQuery();
cmd = new SqlCommand("update tbltest set [check]='True' where ID='" + rdr1[0].ToString() + "'", con1);
i = cmd2.ExecuteNonQuery();
}
}
cmd.Dispose();
rdr1.Close();
Here one datareader is already open with tblTest and inside of while loop I am trying to update records for table tblTest,Please let me know how to fix datareader problem. We can do with dataadapters but here how we can solve it?
|
|
|
|
|
What are you trying to do??
Selecting values from tblTest and inserting again into same table??
|
|
|
|
|
selecting values from one table like [tblOne] then matching records with other table like [tblTwo] then updating first table [tblOne].
|
|
|
|
|
To be honest, it is not easy to read your code. Could you clean that up a little?
While cmd is the created command, cmd1 and cmd2 are executed. It's weird and does
not invite someone to look into it in detail. Also, could you describe the problem and
maybe some details of the goal you're trying to archive?
|
|
|
|
|
It is not the problem of DataReader. When the DataReader is opened, it will hold the connection exclusively. So you can't execute any sql commands when it opened.
The solution is to use a separate connection or use a DataSet.
P.S : You need to improve your coding standards.
|
|
|
|
|
hi,i am doing one page i.e;sending messages to mobile.so i want how to send message at particular time means user type some message and select some particular time now we(programmers) have to send that massege at that time (automatically)programatically.send code(code behind) soon.......... plz
|
|
|
|
|
|
How do you think Windows Service would help her? She needs user interaction. In her requirement user should be able to schedule sending of a message? How would you do that using Windows Service??
..Go Green..
|
|
|
|
|
Yes, She needs the user interaction for schedule. But already she has a page for UI(For Creating Message, Setting Time Schedule). But the sending Message process we need windows service(Get data from database & check the time then send message to mobile). You suggested her the Timer control for her issue, but the problem is you can't send message always by using a web page(what will happen if she close the page?) so you need the windows service for the message sending process.
|
|
|
|
|
Okay, I got it. So everything needs to be saved into the database and the service on the server will check the database at a regular time interval and will match the current time and scheduled time. If a message send job is found, get the details and send the message.
So the important thing here is triggering the job which will be done by our service.
I knew I am on ASP.NET page, but Windows application thing was going in my mind.
I have removed my answer.
..Go Green..
modified on Tuesday, July 6, 2010 6:44 AM
|
|
|
|
|
Absolutely right, Most of us using windows service for these type of mass jobs(like Email/Fax/SMS).
cheers
|
|
|
|
|
hello all, I have a object list(Customers) which I am binding to a gridview. Problem is that the Customers object has 30 fields/attributes & I am binding only 6 in the gridview columns, the rest are wasted.
Should I make another class to deal with gridview only,but that would mean a lot of classes for gridviews alone ? Is there a way I can do this with inheritance making a child class or something ? Please help me.
Thanks, Mike.
|
|
|
|
|
U can make another class for having required columns only, coz it may create performance overhead
when u have huge no. of records tht r fetched n displayed.
http://www.opexsolution.com/forum/[^]
|
|
|
|
|
Yes I know but what is recommended,
using inheritance with the superclass or a new class overall ?
Thanks, Mike.
|
|
|
|