|
jagadeeshkumar2106 wrote: iam looping the datatable in loop is this kills the speed of the application?
If your dataset is too large, it might kill the speed of app. Why don't you just bind the gridview instead of looping through ..
modified on Monday, December 31, 2007 4:01:04 AM
|
|
|
|
|
jagadeeshkumar2106 wrote: iam looping the datatable in loop is this kills the speed of the application?
Filling datatable is costly, usually when you loop through high volume data, application will become slower. This will happen with datatable too. If you need forward only movement, better use DataReader. They are faster.
|
|
|
|
|
sir u mean instead datatable to check in loop i have to use datareader
|
|
|
|
|
jagadeeshkumar2106 wrote: i have to use datareader
It would be bit faster. BTW, what is the need to loop through each data ?
|
|
|
|
|
I display the data from database in gridview after that i click the row it will display the particular data for every 5 minutes in detailsview.please give us the article
|
|
|
|
|
You can probably reply to the previous thread that you have made. Plus, there are some replies for your questions. You should reply those questions without posting new thread..
|
|
|
|
|
use AJAX Timer Control for that
|
|
|
|
|
Be more descriptive in your subject line. "Please help" is very vague.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
I ahve a table for storing some datas.In the table one field is an image upload field.The datatype of that field is image.When i tried to save the image using a fileupload control the image is saved.The code for saving is gioven below.
public void SaveUnitDetails(string UnitName, string UnitShortName, string Location, string UnitLogoPath, string UnitStream, string MaxStudentsPerClass, string CreatedByUser, DateTime CreatedDate)
{
string sqlstatement;
Boolean isSaved;
try
{
sqlstatement = "INSERT INTO Units(UnitName,UnitShortName,Location,UnitLogoPath,UnitStream,MaxStudentsPerClass,CreatedByUser,CreatedDate) VALUES ('" + UnitName + "','" + UnitShortName + "','" + Location + "','" + UnitLogoPath + "','" + UnitStream + "','" + MaxStudentsPerClass + "','" + CreatedByUser + "','" + CreatedDate + "')";
isSaved = dbtObj.ExecuteSqlCmd(sqlstatement);
}
finally
{
}
}
The datas will be bindede into a grid .An image field is bounded on the grid .But the image is same for all rows.What is the pbm.Plz help me.
insunit.SaveUnitDetails(Txt_UnitName.Text, Txt_ShortName.Text, Txt_Location.Text, Upload_Logo.FileName.ToString(), Stream, TxtStdperClass.Text, username, date);
the datas will be saved on a button click event the saved function is called as given above.Plz check the code and help me to overcome the pbm...
|
|
|
|
|
Hi all
I Wount to add Footer to DataGridView In C#.Net Windows Application
But In Windows Application The DataDridView Dont Have Footer To Add it
I wount to How i can add footer to DataGridView or A new Free Grid Control Have Footer
Thanks For Any Body Help Me
Thaer
|
|
|
|
|
If you want to show the footer of GridView in ASP.NET, you need to check "Show Footer".
|
|
|
|
|
Hi,
in window application is there any property like that ?
Michael Sync wrote: "Show Footer".
I didnt see ever.
Thanks,
Sun Rays
To get something you must have to try once.
My Articles
|
|
|
|
|
I wrote "in ASP.NET" in my thread.. As you know, this forum is for ASP.NET question.. not for Window application... So, I'm not gonna answer the window question in web forum..
|
|
|
|
|
Hi,
oh ok.
But actually he asked for window application..
So we have to guide him to go for window forum..
Thanks,
Sun Rays
To get something you must have to try once.
My Articles
|
|
|
|
|
hi ok i know
but what is problem for this quesion in this Forum
i need any help for this subject in windows application no one can help me
may be in this Forum any one can help me because the members in ther is more jenuse than windows application
thanks Mr Michael
Thaer
|
|
|
|
|
Hey,
check it out..
May be it will help you.
Link[^]
Thanks,
Sun Rays
To get something you must have to try once.
My Articles
|
|
|
|
|
Hello everybody,
I am getting an error: The name 'DataList1' does not exist in the current context.
DataList1 is a data list the code is in two pages:
Have no idea what the problem is. Any assistance is appreciated.
groups.aspx, and groups.aspx.cs
groups.aspx:
I remobed the open tags so that the code can be seen.
asp:DataList ID="DataList1" runat="server" DataSourceID="ChalkDL">
ItemTemplate>
asp:TextBox ID="postComment" runat="server">
asp:Button runat="server" OnClick="postBtn_Click" ID="postBtn" Text="Post!" />
/ItemTemplate>
/asp:DataList>
groups.aspx.cs
protected void postBtn_Click(object sender, EventArgs e)
{
SqlDataSource PostDS = new SqlDataSource();
System.Web.UI.WebControls.TextBox PostText = (System.Web.UI.WebControls.TextBox)DataList1.FindControl("postComment");
PostDS.ConnectionString = ConfigurationManager.ConnectionStrings["ConnectionString"].ToString();
PostDS.InsertCommandType = SqlDataSourceCommandType.Text;
PostDS.InsertCommand = "INSERT INTO GroupChalkboard (Text, GroupID, UserID, CreatedDate) VALUES (@Text, @GroupID, @UserID, @CreatedDate)";
PostDS.InsertParameters.Add("Text", PostText.Text);
PostDS.InsertParameters.Add("GroupID", pid.ToString());
PostDS.InsertParameters.Add("UserID", Session["UserID"].ToString());
PostDS.InsertParameters.Add("CreatedDate", DateTime.Now.ToString());
PostDS.Insert();
}
|
|
|
|
|
Albert83 wrote: System.Web.UI.WebControls.TextBox PostText = (System.Web.UI.WebControls.TextBox)DataList1.FindControl("postComment");
This line should be
TextBox PostText=(TextBox)DataList1.Items[IndexHere].FindControl("PostComment");
Albert83 wrote: I am getting an error: The name 'DataList1' does not exist in the current context.
Can you get DataList1 control in codebehind side?
If no, It should be inherit problem of the page.
Check page directory of groups.aspx and class name of groups.aspx.cs.
please don't forget to vote on the post that helped you.
|
|
|
|
|
I can't get the DataList in code behind that's the problem. The weird thing DataList1 does show up in the list and I can choose Items property and find control property. But when I run it, it says DataList1 does not exist in the current context.
How to resolve it ?
That's aspx:
%@ Page Language="C#" AutoEventWireup="true" CodeFile="groups.aspx.cs" Inherits="groups" %>
that's aspx.cs
public partial class groups : System.Web.UI.Page
{
Also
In this code: TextBox PostText=(TextBox)DataList1.Items[IndexHere].FindControl("PostComment");
what's Items[IndexHere] - what index is that. Should I count the number of items in the ItemTemplate?
|
|
|
|
|
Albert83 wrote: The weird thing DataList1 does show up in the list and I can choose Items property and find control property.
Did you get runtime error or compile time error?
Albert83 wrote: In this code: TextBox PostText=(TextBox)DataList1.Items[IndexHere].FindControl("PostComment");
what's Items[IndexHere] - what index is that. Should I count the number of items in the ItemTemplate?
Yes.you have to do looping through datalist items.
please don't forget to vote on the post that helped you.
|
|
|
|
|
I got the error after I clicked Run, and it says Build failed. I guess it compile erro. What's the difference between run time and compile.
|
|
|
|
|
If we have a checkbox in a grid when we check the the checkbox a javascript function will be called and if we uncheck the same checkbox another javascript will be called.How is it possible...Its Urgent
|
|
|
|
|
|
|
Hey,
try this..
Javascript function
var chkT;<br />
function Test(chkT)<br />
{<br />
alert(chkT.checked);<br />
}
Add template filed. In that add checkbox and then find control in RowDataBound event of Gridview.
Code behind file.
try<br />
{<br />
CheckBox chk = (CheckBox)e.Row.Cells[6].FindControl("chkTest");<br />
chk.Attributes.Add("onclick", "javascript:Test(this);");<br />
}<br />
catch(Exception ex)<br />
{<br />
}
See whats happening...
Thanks,
Sun Rays
To get something you must have to try once.
My Articles
|
|
|
|