|
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.
|
|
|
|
|
Hi,
I'm new to Ajax and I want to convert my existing application to Ajax application. I downloaded ASP.NET Ajax extension 1.0 and Control Toolkit and installed it one my PC.
I'm using ASP.NET 2.0. After I changed the Web.config according to the sample project and when I run it, i got the following error. I googled it and still can't get the best solution for me.
Error msg:
"Could not load file or assembly 'Microsoft.Web.Preview' or one of its dependencies. The system cannot find the file specified"
Can somebody help me , please ?
Thanks in advance,
Richard
|
|
|
|
|
Hi!
In order to resolve this Exception follow the below mentioned steps
1. Download and install the ASP.NET 2.0 AJAX Futures January CTP from http://www.microsoft.com/downloads/details.aspx?FamilyID=4CB52EA3-9548-4064-8137-09B96AF97617&displaylang=en
2. Make sure that there’s a reference in your web project to the Microsoft.Web.Preview dll that gets installed (under C:\Program Files\Microsoft ASP.NET\ ASP.NET 2.0 AJAX Futures January CTP\v1.0.61025)
This will solve your Problem definetley.
3. Update the project’s Web.config file so that it contains the following entries
<system.web.extensions>
<scripting>
<webServices>
<jsonSerialization>
<converters>
<add name="DataSetConverter" type="Microsoft.Web.Preview.Script.Serialization.Converters.DataSetConverter, Microsoft.Web.Preview"/>
<add name="DataRowConverter" type="Microsoft.Web.Preview.Script.Serialization.Converters.DataRowConverter, Microsoft.Web.Preview"/>
<add name="DataTableConverter" type="Microsoft.Web.Preview.Script.Serialization.Converters.DataTableConverter, Microsoft.Web.Preview"/>
</converters>
</jsonSerialization>
</webServices>
</scripting>
</system.web.extensions>
Hope this will solve your problem.
|
|
|
|
|
Hi
I have a listbox which binds data from a database, I can see the datatextfield values but how would i see the datavaluefield values as well, i.e. show two columns in a listbox
Is this possible?
Is it better to use another control?
thanks
|
|
|
|
|
I don't think that ListBox can display data like this.
|
|
|
|
|
Would a dropdownlist be better?
Badically ive got some values in a listbox but I also need to get their IDs ive got them in the datavaluefield but im not sure how to view this?
|
|
|
|
|
.netman wrote: dropdownlist be better?
Nope. You won't be able to view the value. If you need just to display data, use Repeater .
|
|
|
|
|
ok thanks for the reply
I have another question then which is related to the listbox
basically i have the loop that was discussed yday but with a stored procedure in
Now what I would like to do is for each row in the database it gets updated with one of the items from the listitem i.e.
i have
1,2,3,4,5 in listbox
then in the table it would do the following
id1 = 1
id2 = 2
id3 = 3
id4 = 4
id5 = 5
However all it does at the mo is add the same number to all the ids instead of one item applied to each id
Why is this?
any help would be great!!
thanks
foreach (ListItem item in listbox1.Items)
{
SqlCommand cmd = new SqlCommand("stored_procedure", con);
cmd .CommandType = CommandType.StoredProcedure;
}
|
|
|
|
|
.netman wrote: However all it does at the mo is add the same number to all the ids instead of one item applied to each id
This doesn't make any sense to me. Can you explain more ?
|
|
|
|
|
u can take another listbox and bind it with previous listbox's datavaluefield.
but u cant display both DataTextField & DataValueField in same ListBox
|
|
|
|
|
Hello friends,
I am facing a very diffrent typr of problem. In my applicetion there is a loginid when i put somthing in it emailid is autogenerated through javascript and put this to the emailid textbox.
I am also having two dropdownlist ddlCountry and ddlState. the page postbacks when we select a country and ddlState is filled.During this time txtEmailid becomes blank.
now if i again generate an onblur event on the loginid emailid is filled but when i click save button it again lost.
No value can be retrieve from the txtEmailid.
How to solve this problem........
Deepak Nigam
|
|
|
|