|
To add a textbox runtime just try
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
ViewState["txt"] = 0;
}
}
public void name(object sender, EventArgs e)
{int txt = (int)ViewState["txt"];
TextBox txt1 = new TextBox();
txt1.ID = "txt" + (++txt).ToString();
Panel1.Controls.Add(txt1);
txt1.Text = ;
ViewState["txt"] = txt;
}
After creating a Panel in the .aspx page.
Can't understand why u need gridview.
Hope it helps
BYE
|
|
|
|
|
Hi,
I'm using the Ajax Control Toolkit, and I have a problem with the Tabs control.
On the Control Tollkit description it's written that the selected page should remain enabled after a postback..But it doesn't happens.
I'm using Visual Web Developer, and testing the pages using his virtual server.
After a postback the selected tab is changed, and is always selected the one who is open in the Web developer page..
Suggestions?
Thanks!
|
|
|
|
|
you may need to use
if (Page.IsPostBack == true)
{
do something i.e. set current tab as default
}
or not use default tab
put your code up if you want
hope that makes sense
|
|
|
|
|
I think I can do something similar, but I can't understand why it doesn't works with me, while it's supposed to work!
suggestions??
|
|
|
|
|
In the prototype that I tested with, the tab control did retain its value through postbacks, whether I changed tabs by clicking them in the UI or used the client script API to set the tab. The only time that I was able to reproduce the behavior that you are seeing is when I explicitly set the ActiveTabIndex property of the control on the server side. In that case, the index that I requested was honored.
Are you setting the ActiveTabIndex property at all? If so, you may need to ensure that you're only setting it when not in a postback.
Hope that helps.
--Jesse "... the internet's just a big porn library with some useful articles stuck in." - Rob Rodi
|
|
|
|
|
no, i'm not using the ActiveTabIndex, I'm just using the tabs without properties at all..
??
|
|
|
|
|
It may be helpful to post some of your code at this point, as I'm unable to reproduce the behavior that you're seeing. Hopefully, that will help us to find the issue.
--Jesse "... the internet's just a big porn library with some useful articles stuck in." - Rob Rodi
|
|
|
|
|
The matter is that it' doesn't depend from the code I used..
Every time I create a Tab panel from the Control Toolkit, even in a new page of a new project, the active tab is not preserved after postback.
Could it depend from Visual Web Developer?I'm trying to test it with the virtual server of VWD, perhaps it should work if the application is online..
Or not?
Is it normal to have it not working if trying from VWD?
Thanks!
|
|
|
|
|
Hi
I am using GridView control.I want to get cell value in RowCommand Event. I have tried this code
Grv_GridView.Rows[Grv_GridView.SelectedRow].Cells[0].Text
But I'm getting Error, How do I get cell value,
pls Help me
Thank & Regards
Vijay s
|
|
|
|
|
Hope it helps:
protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
{
((LinkButton)this.GridView1.Rows[Convert.ToInt32(e.CommandArgument)].Cells[0].Controls[0]).BackColor = Color.Red;
}
Amit Agarwal
|
|
|
|
|
Try this
int index = Convert.ToInt32(e.CommandArgument);
string pname = GridView1.Rows[index].Cells[0].Text;
|
|
|
|
|
Yes Its working,After that I am adding Button in Template column.After clicking that button Its invisible I have done that
using this code.
GridViewRow row = (GridViewRow)(((Button)e.CommandSource).NamingContainer);
Button lblProdId = (Button)row.FindControl("btn");
lblProdId.Visible = false;
but now This code getting Error.
int index = Convert.ToInt32(e.CommandArgument);
string pname = GridView1.Rows[index].Cells[0].Text;
what i can do, Do u have any Idea
Thank & Regards
Vijay s
|
|
|
|
|
I want insert the .PDF file in internet explorer from add existing item (ASP .net with C#)
I am try to add the .pdf file into .aspx internet explorer but the pdf file format not accept the text format....
can be add any dll file in my project for convert the pdf file to text
|
|
|
|
|
add required pdf to ur project.ie ; copy and paste it in to ur project.then give appropriate link.if u not installed the acrobat reader u cant open the uploaded pdf files.
|
|
|
|
|
Is this not a repeated question?
|
|
|
|
|
copy and paste u r .pdf file in u r wesite folder and write on button_click event
server.transfer("test.pdf")
and if u have pasted u r document in a folder then
server.transfer("folder_name\test.pdf")It will take the Path automatically upto your main website folder i.e. "C:\Inetpub\wwwroot\Website1\"
(can open any kind of documents e.g.*.doc,*.csv,*.pdf,*.txt,*.xls,*.mdb,*.ppt,*.pps etc)
it will directly open your file.
modified on Friday, April 11, 2008 7:59 AM
|
|
|
|
|
i have some panels in my default.aspx page ,say pane11 and panel 2.in the next page i have a button, when i am clicking the button it should go to panel2 in default.aspx.
how to redirect in to a perticular panel in a page?
"Lack of will power has caused more failure than lack of intelligence or ability. "
|
|
|
|
|
Lets assume that your panel2's id is "panel2". If you formatted your link as default.aspx#panel2 when redirecting, the browser will attempt to jump to that element. If there is enough content, the browser will scroll so that the element with "panel2" is the element at the top of the page. If there is not enough content, it will scroll "panel2" as close to the top as possible.
One thing to keep in mind with ASP.NET and server controls is that the id that you assign may not be the id that the browser receives. Be sure to use the ClientID property of panel2 to ensure the id is fully formed.
Hope that helps.
--Jesse "... the internet's just a big porn library with some useful articles stuck in." - Rob Rodi
|
|
|
|
|
Thanks very much.let me try.
|
|
|
|
|
how do download the PDF to Text Converter Dll.... This Dll used in my project how to use it....
|
|
|
|
|
http://www.google.co.uk/search?hl=en&q=pdf+to+text+converter+dll&btnG=Search&meta=
|
|
|
|
|
|
post your code so we can see what is happening
|
|
|
|
|
dear friends,
iam vijay, i have a doubt in creating the dynamic menus using xmldatasource in asp.net.
In the xmldatasource the default source is xml file, but we need to assing the xml field from sql server 2005 as a datasource.
thank you
|
|
|
|
|
vijay kanth wrote: ql server 2005 as a datasource.
MSDN[^] has article. Try to search before you post here.
|
|
|
|