|
you need some inline coding and a bit of css in it.
try the site asp.net /samples
or google it "gridview displays" or "gridview display examples" also try ajax on it.
|
|
|
|
|
set Pagesize="10"
and add below code in .aspx page
<PagerSettings Mode="NumericFirstLast" NextPageText="" Position="TopAndBottom" PreviousPageText="">
</PagerSettings>
may be it will work..
|
|
|
|
|
hi,
I have a textbox.I have to trigger an event whenever any key is prressed except the alphabets and numbers like event trigger on when tabg button is pressed.I have used textchanged event but it only worked for enter key.
regards,
Bill
|
|
|
|
|
Its quite difficult to answer unless and until you have put the code for that section.
cheers,
Abhijit
CodeProject MVP
|
|
|
|
|
use javascript..
onblur()
|
|
|
|
|
What is the difference between Sqldata reader,Sqldata adapter with dataset and Sql datasource? Which is the best and effective method for database operations?
|
|
|
|
|
|
i have a datetime field,its name is modifydate. i want 2 previuse day of modifydate. what should i do in c#. plz help
|
|
|
|
|
you need to use timespan function or you can also use
System.DateTime dtTodayNoon = new System.DateTime(2006, 9, 13, 12, 0, 0);
System.DateTime dtTodayMidnight = new System.DateTime(2006, 9, 13, 0, 0, 0);
System.TimeSpan diffResult = dtTodayNoon.Subtract(dtYestMidnight);
Government Dyal Singh College Lahore.
|
|
|
|
|
The OP was not asking for the difference between 2 datetimes, he asked for a datetime minus 2 days
|
|
|
|
|
Buy a basic ASP.NET book and read it. Learn to use intellisense to investigate methods on a class. Learn to use google, and the MSDN site in particular. Asking in the right forum ( this has nothing to do with ASP.NET )
The DateTime class has everything you need.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
As counter-intuative as it might seem at first glance, it is totally appropriiate to supply a negative number to the AddDays[^] method on a DateTime.
|
|
|
|
|
There is dropdownlist on my page which showes country name. on click of country name popup will get display which showes companyname of selected country , and same dropdown will again get display.
In Popup dropdownlist ,it will display selectedItem value (CountryName)as which we have selected from main page.
for tht i have return code as follwes
drdCountry.DataTextField = "CountryName";
drdCountry.DataValueField = "CompanyCount";
drdCountry.DataSource = dsCoverageList.Tables[0].DefaultView;
drdCountry.DataBind();
drdCountry.SelectedItem.Text = Request.QueryString["CountryName"].ToString();
drdCountry.SelectedItem.Value = Request.QueryString["CompCount"].ToString();
but prob is on popup page in dropdownlist is showes duplicate value of selected item
means suppose i have selected US (CountryName) from main drplist thn in popup page is showes US 2 times in DrpList.
why is it so??..
please help me out..
|
|
|
|
|
use page.ispostback check on page load
or clear dropdown list before filling it...
Government Dyal Singh College Lahore.
|
|
|
|
|
i have writ code in (!IsPostBack)
still its not working..
|
|
|
|
|
Hi,
What namespace should I use in order to access the Membership.ValidateUser() method?
I have added using System.Web.Security and I have added System.Web in the References folder but I cannot access Membership????
Illegal Operation
|
|
|
|
|
using System.Data.OleDb;
|
|
|
|
|
Have you added the right dlls to your project ?
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
I found the issue.
I had a folder named Membership. I changed the name of the folder and the inheritance of the code behind and now it works!
Illegal Operation
|
|
|
|
|
|
Hi all,
i am trying to get the text from a label that it is inside of a detailsview field. This field is in fact a template field, and inside its ItemTemplate there is the Label control (ID = "Label8") which Text property i want to read.
i tried the following without success (returns c = null):
System.Web.UI.Control c = dvCU.FindControl("Label8");
string s = ((System.Web.UI.WebControls.Label)c).Text;
can anyone help me?
Thanks in advance.
modified on Tuesday, April 7, 2009 4:27 PM
|
|
|
|
|
where is your code. In other words, which method is your code in.
you can not get the controls the way you are showing.
1. you need to access your details view control
2. then you need to access specific row in the control
3. then you need to do a find
protected void grdItemDetail_RowDataBound(object sender, GridViewRowEventArgs e)<br />
{<br />
Image img = (Image)e.Row.FindControl("Thumbnail");<br />
}
Yusuf
Oh didn't you notice, analogous to square roots, they recently introduced rectangular, circular, and diamond roots to determine the size of the corresponding shapes when given the area. Luc Pattyn[^]
|
|
|
|
|
Hi Yusuf,
the code is located on a void arguments method, which i invoked somewhere inside the "father" gridview _SelectedIndexChanged() method :
public void BlahBla()
{
...
System.Web.UI.Control c = dvCU.FindControl("Label8");
string s = ((System.Web.UI.WebControls.Label)c).Text;
}
You are right, i think now the problem is that i need some argument that contains the detailsview control so i can access it in right way. So i went to the detailsview_DataBound() event, and did this:
protected void dvCU_DataBound(object sender, EventArgs e)
{
if (((DetailsView)sender).FindControl("lblAlcance") != null)
iAlcance.ImageUrl = "~/Recursos/Iconos/Alcance (scope)/" + ((System.Web.UI.WebControls.Label)((DetailsView)sender).FindControl("lblAlcance")).Text + ".png";
if (((DetailsView)sender).FindControl("lblNivel") != null)
iNivel.ImageUrl = "~/Recursos/Iconos/Nivel (level)/" + ((System.Web.UI.WebControls.Label)((DetailsView)sender).FindControl("lblNivel")).Text + ".png";
}
and... voila!! the thing worked as charm!!
Thanks a lot for your help.
Sorry if i explain not very good, i am very noob at asp and c#.
|
|
|
|
|
you are welcome. I'm glad to help.
Yusuf
Oh didn't you notice, analogous to square roots, they recently introduced rectangular, circular, and diamond roots to determine the size of the corresponding shapes when given the area. Luc Pattyn[^]
|
|
|
|
|
I am trying to develop a Time Sheet Application. In that, I need to sub-divide a "Date" Column in to two columns as "Regular Hours" and "Over Time Hours. I am using TemplateFeilds for the Column. Can any one tell me how can I sub-divide a column into two columns???
Thank you in advance
|
|
|
|