|
I have a gridview that has an imagebutton column and a check box column.During
GridView1_RowDataBound event i disable the checkbox column.Later when i click the image button i display a PDF document in a seperate window using a method named "exportgridview" and try to enable the corresponding
checkbox.The problem is when i click the imagebutton the PDF is shown but the checkbox which is in the same row as the clicked imagebutton doesn't get enabled.I will show u the code in the
imagebutton click event.
protected void ImgBtnPDF_Click(object sender, ImageClickEventArgs e)
{
ImageButton ib = (ImageButton) sender;
TableCell tablecell = (TableCell)ib.Parent;
GridViewRow row = (GridViewRow)tablecell.Parent;
CheckBox CBox = (CheckBox) row.FindControl("CheckBox2");
CBox.Enabled = true;
Session["FamilyKey"] = row.Cells[1].Text;
Session["StudentKey"] = row.Cells[2].Text;
ExportGridView(); // this method shows the PDF in a seperate window
}
|
|
|
|
|
you can write your code in GridView_RowCommand() event
Dim ImageID As Integer = Convert.ToInt32(e.CommandArgument)
If e.CommandName = "Image" Then
'Find the check box control and you can enable them.
end if
how to enable a check box in a gridview
mitesh
|
|
|
|
|
Hi,
My XML looks like ABC,XYZ
In my coding I getting this using
XmlNodeList allNodes= XmlDoc.GetElementsByTagName("Book");
I am checking whether this any childnodes exists for this using
XmlNode child=allNodes[0].ChildNodes[0];
string Childname= child.Name;
I am getting this(childname as) "#text" ,though no childnode is there in my XML
|
|
|
|
|
pls provide the xml structure that u r using.
regards
|
|
|
|
|
when i run application i want previous visited site url details of internetexplorer
supose before runing the application i visited a google.com and yahoo.com etc.,
when i run the application the need th url address of the visited sites it is possible in asp.net if yes plz tell me how to do it
i used in my application below code but it display the current application url address
Label1.Text = Request.ServerVariables("HTTP_REFERER")
|
|
|
|
|
Check this.Request.UrlReferrer.ToString();
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
Check My Blog
|
|
|
|
|
|
Hi all,
I have requirement of converting asp.net control say gridview in my webpage into image.
I succeeded in converting the entire webpage into image using web bwoser control. But i don't know how to convert only a specific control say gridview with data and style sheets into image.
Later i have to export these image to MS Word, PDF, Power point.
So please suggest me how to do the convertion of gridview into image using c# and asp.net.
Thanks in advance.
Cheers,
sekhar.
|
|
|
|
|
|
Hi Rocky, thanks for your suggestion.
But i already did converting the page into Image and i succeeded in that.
I wnats to convert only a specific control of a page into Image.
Is there any way to do taht...
Cheers'
sekhar.
|
|
|
|
|
|
for validation:
I want to call a function which is in .js file,
function called in inline code by
<asp:textbox id="TextBox2" onkeypress="function name" runat="server" xmlns:asp="#unknown"></asp:textbox>
is it correct way to call ????
or any one tell me the write way to call function from javascript file
i already done following code runnable for keypress event,
<asp:TextBox ID="TextBox1" onkeypress ="
if (!((event.keyCode > 47 && event.keyCode < 58)||event.keyCode==45||event.keyCode==46||event.keyCode==110||
event.KeyCode==190||event.keyCode==8||event.keyCode==9))
{
alert('Please Enter Numbers only...');
event.returnValue = false;
}
else
{
event.returnValue=true;
}
" runat="server"></asp:TextBox>
Please tell me the way to call function in aspx inline code
or any fault in given code
|
|
|
|
|
use
TextBox1.Attribute.add("onkeypress","javascript:f1()")
in
|
|
|
|
|
There are manu ways to call the javascript funtion from aspx and code behind file
Write you javascript function
and call it from on that event
<asp:TextBox ID="TextBox1" onkeypress="myfunction();" runat="server"></asp:TextBox>
in same you can register the same from code behind file also
TextBox1.Attributes.Add("onkeypress", "javascript:myfunction();");
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
Check My Blog
|
|
|
|
|
Hi Friends
I want to design a search engine for my local database.I want to design search engine in asp.net. how to remove stopwords and how to generate a query for select statement in database for retrive the results
your's subbu
modified on Monday, September 15, 2008 5:38 AM
|
|
|
|
|
My friend you are in wrong forum ,This is asp.net forum
Please try in Sql/Database forum
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
Check My Blog
|
|
|
|
|
according to the dbase field count i want to create imagebutton on my webpage. I done that with same click events.
then i want to zoom image when clicking each images. why i fetch each button id from the click ?
|
|
|
|
|
Could you explain a little more ?
unable to understand what are you trying to do
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
Check My Blog
|
|
|
|
|
i think u have to use delegates
T.Balaji
|
|
|
|
|
I created a search page(search.aspx) to get the column name the user want to display and pass them as query string to detail list page(detail.aspx).
In the detail list page, I created a gridview to display those columns. At first, when I created the gridview, I invisible them.
<asp:content id="Content1" contentplaceholderid="phMain" runat="Server" xmlns:asp="#unknown">
<asp:gridview id="GridView1" runat="server" autogeneratecolumns="False">
DataKeyNames="autoid" DataSourceID="SqlDataSource1">
<columns> <asp:boundfield datafield="autoid" headertext="ID" insertvisible="False">
ReadOnly="True" SortExpression="autoid" />
<asp:boundfield datafield="name" headertext="Name" sortexpression="name" visible="False">
<asp:boundfield datafield="description" headertext="Description" visible="False">
SortExpression="description" />
<asp:boundfield datafield="typeid" headertext="Type" visible="False">
SortExpression="typeid" />
<asp:boundfield datafield="daterequested" headertext="Date Requested" visible="False">
SortExpression="daterequested" DataFormatString='{0:dd/MMM/yy}"' />
<asp:boundfield datafield="requiredby" headertext="Required By" visible="False">
SortExpression="requiredby" DataFormatString='{0:dd/MMM/yy}"' />
<asp:boundfield datafield="lastupdated" headertext="Last Updated" visible="False">
SortExpression="lastupdated" DataFormatString='{0:dd/MMM/yy}"'/>
<asp:boundfield datafield="lastcomment" headertext="Comment" visible="False">
SortExpression="lastcomment" />
<asp:boundfield datafield="lastupdateby" headertext="Last Update By" visible="False">
SortExpression="lastupdateby" />
<asp:sqldatasource id="SqlDataSource1" runat="server">
ConnectionString="<%$ ConnectionStrings:ConnectionString1 %>"
SelectCommand="SELECT * FROM [tbldetail]
Then, in the Page_Load, I want to visible particular column which pass the string from page before (search.aspx)
protected void Page_Load(object sender, EventArgs e)
{
String selectcolumn = this.Request.QueryString["Selected"];
string[] columnID = commaStringToArray(selectcolumn);
// how to find the datafield of each column and visible them.
}
private string[] commaStringToArray(string strComma)
{
string [] strArray;
strArray = strComma.Split(new char[] {','});
return strArray;
}
In the web, they were all searching the headertext. But, I want to do the datafield.
work
|
|
|
|
|
hi friends,
fine and hope u so...
in my asp.net page i having one server side dropdownlist and html Control textbox.When i am selecting item from dropdownlist,the value in the textbox is cleared why beacuse i used autopostback "true" for dropdownlist item.i want to retain the value of the textbox when i am selecting different items in the dropdownlist...
note : i set EnableViewState="true" inthe dropdownlist ...it is only working if i used runat="sever" in the textbox control...
can u plz help me to solve this prob????..
i am looking forward to hearing from u...
bye..
|
|
|
|
|
dayakar_dn wrote: note : i set EnableViewState="true" inthe dropdownlist ...it is only working if i used runat="sever" in the textbox control...
So, why don't you use it as a server side control?
dayakar_dn wrote: can u plz help me to solve this prob????..
Another option is to store the value of the textbox somewhere and than again populate it after the postback.
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
hi Manas Bhardwaj,
i tried as u said....
i got the value of html textbox in the code behind page
with the help of the following code...
Request.Params["ComapanyName"];
how to populated back this value to the html textbox without using runat="server"...
|
|
|
|
|
Use request object to get value of your html textbox
and populates the control on every postbacks
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
Check My Blog
|
|
|
|
|
Hi Friends ,
I have problem regarding creation bin folder in ASP.NET 2.0 which includes .DLL and assemblies for deploying the website.Whenever , I am compiling and running my asp.net 2.0 application , it won't create bin folder in the application.And I want to create bin folder automatically , as like in .NET versio 1.1
Please, suggest me that , what's the solution of this problem?
thanks in advance.
|
|
|
|