|
J walia wrote: I want to create 3d type restaurant menu.
You can use CSS and Images for 3D Looks !!
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
For Better Look
You can go for Flex or Silverlight For Better Presentation..!
J walia wrote: I want to create 3d type restaurant menu.
Can You Explain More ..?
LatestArticle :Log4Net
Why Do Some People Forget To Mark as Answer .If It Helps.
|
|
|
|
|
linkButton lnkBtnRemove=(linkButton)Repeater1.items[0].findControl("lnkRemove");
lnkBtnRemove.visible=false;
i used above code to make visible false of a link button i have placed in a repeater control.but it gives me the below error message.
"Index was out of range.Must be non-negative and less than the size of the collection.Parameter name:index"
i'm trying to use this in Page_load .pls help??
|
|
|
|
|
Hi
I tried the same piece of code and it worked for me. Make sure that you first bind the data to repeater control and then make it false.
Naina
Naina
|
|
|
|
|
Hii,
You are getting error bcz your it unable to find th row at 0th index. So better use in the Repeater1_ItemDataBound event, also must check the condition:
protected void Repeater1_ItemDataBound(object sender, RepeaterItemEventArgs e)
{
if (e.Item.ItemType == DataControlRowType.DataRow)
{
// your code..
LinkButton lnk = (LinkButton)e.Item.FindControl("control_id");
}
}
Or you can also go for this: This code will work inside/outside of anyevent
foreach (RepeaterItemCollection item in Repeater1.Items)
{
LinkButton lnk = (LinkButton)item[0].FindControl("control_id");
}
Now choice is yours which is more suitable for you but also mind in which scope you are using the code.
Navin C.
|
|
|
|
|
thnks for the anzr.but didn't worked.it cant find any item index in the repeater control,i don't no why?help needed..
thnks in advance.
|
|
|
|
|
Hii,
Use this or mail me your scenario in which scope you want to use.
Remmeber, before using this lines of code, you must bind your repeater control, otherwise it will not work as the control has no values.
Hope this will work:
foreach (RepeaterItem item in Repeater1.Items)
{
Label lbl = (Label)item.FindControl("lblName");
// Use any othe asp control that you want instead of 'Label'.
if (lbl != null)
{
lbl.Text="I cached you!";
}
}
Or, for "DataBound" event of repeater you can use as:-
protected void Repeater1_ItemDataBound(object sender, RepeaterItemEventArgs e)
{
if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
{
Label lbl = (Label)e.Item.FindControl("lblID");
if(lbl!=null)
{
// Do your code with found control;
}
}
}
Regards,
Navin C.
E-mail: navin2k6@gmail.com
modified on Tuesday, December 15, 2009 5:25 AM
|
|
|
|
|
Hi,
I working on a web application. In this I have to export all the data and design of the form in to a pdf file.
If anyone have idea to do this please reply me.
Thanks in advance.
|
|
|
|
|
Take a look at this[^] article. Here it shows writing HTML to PDF. You can get the HTML of you page and write that to the PDF. Hope it helps.
50-50-90 rule: Anytime I have a 50-50 chance of getting something right, there's a 90% probability I'll get it wrong...!!
|
|
|
|
|
how can i add a remember me component in my login form
plz help me
|
|
|
|
|
Login control comes with the remember me option. You can use that.
50-50-90 rule: Anytime I have a 50-50 chance of getting something right, there's a 90% probability I'll get it wrong...!!
|
|
|
|
|
|
Hi,
you can use cookie to remember login information.
modified 27-May-14 5:10am.
|
|
|
|
|
Hi
I am implementing a discussion board as a part of my web project. Can any body please let me know how I can add a controller to write messages and comment liken here in THE CODE PROJECT.
Thank You.....
ThIlInA.
|
|
|
|
|
|
|
Actually, my requirement is to download file from server to client machine without open file open, save dialog box (in silent mode).
i donot want to use ActiveXObject("ADODB.Stream") to save file client side,
and code below always show file open, save dialog box;
Response.AppendHeader("content-disposition", "inline; filename=" + strFileName);
Response.ContentType = ("application/octet-stream");
Response.BinaryWrite(byteRead);
but am really looking for silent file downlon from server to client either using web server calling from client side or something else for solution.
or
Is it possible to write " Response.WriteFile(path); " from Javascript to avoid file open, save dialog box??
thanks in advance.
|
|
|
|
|
kbsnet wrote: really looking for silent file downlon from server to client
Not possible. A client always has to accept a file to download - otherwise its known as a virus.
Bob
Ashfield Consultants Ltd
Proud to be a 2009 Code Project MVP
|
|
|
|
|
Hi all,
I have some following code:
DataTable dt = m_Data.GetInfo();
GridView1.DataSource = dt;
GridView1.DataBind();
Table dt, in fact, has 5 columns A, B, C, D, E, but I want to display just 3 columns in datagridviews A, B, C with new names A1, B1, C1. And I do not know how to do.
Have you got any suggestion for me!
Thank kiu so much!
|
|
|
|
|
Hi
When designing the page page itself you can do that.
Set the column visibility property to false.
And which all columns you want to display set the name in header of ItemTemplate. Working with Item templates, you can customise however you want
Naina
Naina
|
|
|
|
|
You can use BoundField in your gridview. Also make sure to set AutoGenerateColumns to false for your gridview.
50-50-90 rule: Anytime I have a 50-50 chance of getting something right, there's a 90% probability I'll get it wrong...!!
|
|
|
|
|
I sure that to do as you said I must choose a datasource & configure it when designing page, but I can not do that because my datasoucre is unknown until application runs. It is got by the following code:
public DataTable GetInfo()
{
DataTable dt = new DataTable();
try
{
SqlCommand cmd = new SqlCommand("sp_GetInfo", m_sqlConn);
cmd.CommandType = CommandType.StoredProcedure;
if(m_sqlConn.State == ConnectionState.Closed)
m_sqlConn.Open();
dt.Load(cmd.ExecuteReader(CommandBehavior.CloseConnection));
}
catch (Exception ex)
{
throw ex;
}
return dt;
}
.........
DataTable dt = m_Data.GetInfo();
GridView1.DataSource = dt;
GridView1.DataBind();
...................
|
|
|
|
|
This Can Be Done in two ways
1)Selecting only the required columns..!
2)Using the following code in
DataTable dt = m_Data.GetInfo();
GridView1.DataSource = dt;
GridView1.DataBind();
if (GridView1.Columns.Count > 0)
GridView1.Columns[0].Visible = false;
else
{
GridView1.HeaderRow.Cells[0].Visible = false;
foreach (GridViewRow gvr in GridView1.Rows)
{
gvr.Cells[0].Visible = false;
}
}
LatestArticle :Log4Net
Why Do Some People Forget To Mark as Answer .If It Helps.
modified on Monday, November 30, 2009 12:56 AM
|
|
|
|
|
It worked, but how to change the header name of column A to A1 when displaying?
I have need to change name such as in original table I have a column named "AccInfo", then I must display it with the name "Account Infomation" ...
Your suggestion is highly apprecited!
|
|
|
|
|
Try this code..!
GridView1.HeaderRow.Cells[1].Text = "Account Information";
LatestArticle :Log4Net
Why Do Some People Forget To Mark as Answer .If It Helps.
|
|
|
|