2014年7月13日 星期日

[RESOLVED] displaying label values in multiline text from gridview


i got 1 gridview which has hyperlink in one column, wen the user clicks the link he will be directed to another page where the details of particular row will be displayed using individual labels. In those labels one of the label must be multilined for me
coz the text will be too long...


Please help me how to get that .


aspx page of label




Hi,


Just go through this post once: http://forums.asp.net/t/1323030.aspx



su88rao






nt useful... any othr solution ?




This problem could be because of absolute sizing or positioning of the label. don't specify the size of label and don't wrap it in absolutely sized container like panel and it will work fine.



i got the solution... by adding style="word-wrap:break-word;" to label and removing the height property of label can achieve tht 




<asp:Label ID="LblDescription" runat="server"
Font-Bold="True" Font-Names="Verdana"
Font-Size="X-Small" ForeColor="#0061C1" Height="16px"
Width="97px" BorderColor="#0061C1"
BorderWidth="1px" style="word-wrap:break-word;" BackColor="White"></asp:Label>

[RESOLVED] How to create time countdown in datalist or gridview


Hi, I'm trying to make public auction list. And I need time countdown for every row in datalist or gridview. How do I create time countdown in datalist or gridview using Asp.Net/C#?




Have a look at this link,


How to display a timer countdown inside my Gridview:

http://forums.asp.net/t/1743407.aspx/1



Thanks sridhar_rs. I solved my problem.


.aspx




























codebehind


protected void Timer1_Tick(object sender, EventArgs e)
{

foreach (GridViewRow item in GridView1.Rows)
{
var label2 = item.FindControl("Label2") as Label;

var label3 = item.FindControl("Label3") as Label;
var time2 = DateTime.Parse(label3.Text);
label.Text = (time2 - DateTime.Now).Days + " Day " + (time2 - DateTime.Now).Hours + " Hours " + (time2 - DateTime.Now).Minutes + " Minutes " + (time2 - DateTime.Now).Seconds + " Seconds";
}

}




[RESOLVED] how to search data from gridview if i have bind it using sqldatasourse


hi


i am new in asp.net


i have a problem to search data from gridview


i have bind gridview using article:http://msdn.microsoft.com/en-us/library/ms972948.aspx


now i want to search record from that


i have textbox to enter search term and serch button to search


note: i want to use like operator to search the records


please help me


thanks in advance





Vjitendra



i have textbox to enter search term and serch button to search


note: i want to use like operator to search the records





Check this link,this is the exact way what you want


http://www.aspdotnet-suresh.com/2011/12/search-records-in-gridview-and.html


[RESOLVED] dynamically assigning image to literal from code behind but image is not displaying on .aspx


in .aspx



in code behind ( load event of page )


 litTab.Text = "";


but image is not displaying... any idea



Add an HTML img to the literal


litTab.Text = " src='someimage.png'
/>"



ImageButton ib= new ImageButton(); ib.ImageUrl= "~/Images/home.png";

[RESOLVED] Code don&#39;t display the names of months in the Axis X


Hi there, hope in your help.


Why this code don't display the names of months in the Axis X?


Can you help me?

Thanks in advance.


Chart1.ChartAreas["ChartArea1"].AxisX.MajorGrid.Enabled = false;
Chart1.ChartAreas["ChartArea1"].AxisY.MajorGrid.Enabled = false;
Chart1.ChartAreas["ChartArea1"].AxisX.IsMarginVisible = true;

Chart1.Series.Add("Series1");
Chart1.Series["Series1"].LabelFormat = "#,##";
Chart1.Series["Series1"].XValueMember = "month";
Chart1.Series["Series1"].YValueMembers = "number";

Chart1.Series["Series1"].ChartType = SeriesChartType.Spline;

Chart1.Series["Series1"].IsValueShownAsLabel = true;
Chart1.Series["Series1"].IsValueShownAsLabel = true;

Chart1.Series["Series1"]["ShowMarkerLines"] = "True";
Chart1.Series["Series1"]["ShowMarkerLines"] = "True";

Chart1.Series["Series1"].BorderWidth = 3;
Chart1.Series["Series1"].Color = Color.Red;

Chart1.DataSource = objCmd.ExecuteReader();
Chart1.DataBind();

Chart1.SaveImage(PNG, ChartImageFormat.Png);













http://social.msdn.microsoft.com/Forums/getfile/304564







cms9651







Try changing the AisX interval to 1 as opposed to 5000 in your mark up.



thank you very much!


[RESOLVED] Listview


How do I limit the number of rows per page in a listview



inside layout template of listview, add datapage tab as below


set pagesize in datapager tag







hope this helps...



If you're using a datapager, you can do something like shown below:


<asp:DataPager ID="myPager" runat="server" PagedControlID="Your ListView Id"
PageSize=
"5">


[RESOLVED] Gridview adding two Eval to the same Item Template label....


I have an gridview and I need to put the lastname and firstName in the same column, how do I add the firstname and lastname to the same column?



Code:




 

  





'' >



This too will work