|
Ok I did that but I am still getting this error:
Object reference not set to an instance of an object.
It is highlighting this line:
Line 151: e_link.ForeColor = System.Drawing.Color.Black
I have no idea what is going on excpet I think it is not recognizing the hyperlink located in that cell.
Tammy
|
|
|
|
|
Well, the way you're doing this is going to be difficult. The page might not recognize the control yet enough to find it for you. So you might try going to the table itself:
e_link = CType(MyTable.Rows(i).Cells(k).Controls(0), HyperLink)
Logifusion[^]
|
|
|
|
|
Honestly, I still think you're making this too difficult. You're chaning the IDs of HyperLink s to overcome the fact they don't have a CommandArgument like LinkButton . Where LinkButton produces the same results and is much easier to use in this case.
Logifusion[^]
|
|
|
|
|
hi every one i have a problem, i have developed an asp.net application in which in one page i am showing data in grid and on clicking ID in grid it is opening a pop up window in which i can do some changes in the data base based on that id...
every thing is working fine page is refereshing also on clicking save button on the pop up window but my problem starts ... if i click on the back button of the browser window that pop up window automatically popup and all the fields are filled on the bases of id which i have selected earlier
so how do i solve this problem
plez suggest some answer...
Rohit Daga
|
|
|
|
|
Disable the Back Button click of the browser.U will find Javascript code for the same on google.
Thanks and Regards.
|
|
|
|
|
or you can invalidate pages in history.
in .NET 2.0 it is done by this line of code:
Response.Cache.SetCacheability(HttpCacheability.NoCache);
|
|
|
|
|
hi all
i need help from all of u ,my question is,i add checkbox in datagrid and check some or all check box in datagrid and click delete button then those datagrid rows are delete from database.
Thanx in advance
your
peter
|
|
|
|
|
According to what i understood,this is how u can implement
foreach (DataGridItem dg in this.dgApproval.Items)
{
int i = 0;
//u use a for loop like this to find the template column of checkbox in data grid
if(((CheckBox)(dg.FindControl("CheckBox1"))).Checked == true)
{
//here i am retreiving the second column of datagrid as i neeeded it
//first column in data grid is the 0th column
string build_desc1=dg.Cells[1].Text.ToString();
//do what u want here... like i have written update query here
string query;
string query2;
query = "update build_master set approval_flag ="+ i +" where build_desc = '"+ build_desc1+"' ";
}
//make sure you bind the grid again to reflect the changes
BindGrid();
}
Happy Programming
Jiny
-- modified at 8:54 Friday 23rd June, 2006
|
|
|
|
|
How do i write javascript to call dll or exe in asp.net web application?
nevinda
|
|
|
|
|
|
How to access the dynamically created ASP.NET 2.0 controls
|
|
|
|
|
Page.FindControl(string controlId);
|
|
|
|
|
Thanks but i found solution, anyway thanks 4 ur time
|
|
|
|
|
|
Thanks 4 u reply and ur link is very usefull and i have found solution in this way u suggested me....
|
|
|
|
|
Hello,
I posted something similar to this post before but this is slightly different.
The GridView gets populated and in the _RowDataBound event the Accept button(select CommandField button) gets replaced by a text value if there is one as shown below:
The find button populated the GridView correctly and Accept button is replaced with a text where necessary but not sure why when the checkbox on the page is clicked on, then ALL the Accept buttons are shown on the GridView (Which is incorrect).
The check box control only shows a label.
Thanks
If (e.Row.RowType = DataControlRowType.DataRow) Then
'show the clinic code since there is a start date other wise just show the Accept button...
'If Not (e.Row.DataItem("c_start_date").ToString() Is Nothing) Then
If Not (e.Row.DataItem("c_start_date").ToString() = "") Then
e.Row.Cells(9).Text = e.Row.DataItem("c_clinic_code").ToString() 'Change ur text here
End If
End If
|
|
|
|
|
That's because you do it in the RowDataBound event handler which basically happens when data is bound to the control. On postback, this method does not execute if you don't bind data, and the button reappear. So like I said in the other post, you should use two controls here and simple use the Visible property to control the visibility of the controls as this property is persisted in the ViewState.
|
|
|
|
|
Hi Developers
I have written code for two way sorting of Datagrid, and its working fine, BUT I want to have two "Arrows"(Upward and Downward) in each column of datagrid. So that when I click on upward arrow grid is sort in Descending and when I click downward arrow grid should be sorted in Ascending Order.
Any code or reference related to this will solve my problem.
Thanks in advance
Lets work it Out.........!
-- modified at 7:20 Friday 23rd June, 2006
|
|
|
|
|
Just use upword and downword arrow Image and attach it to ur code.
ok fine I will send u Image and code just give me ur email.
Balasaheb
Software Developer
Platform: Asp.net,vb.net
Database: SQL Server 2000
|
|
|
|
|
Hi ALl,
Geetings...can anyone help me regarding the Object Data Source control used in asp.net 2.0
Babu
|
|
|
|
|
Sure! But it would be highly appreciated if you could specify what exactly do you want to know.
Otherwise read http://msdn2.microsoft.com/en-us/system.web.ui.datasourcecontrol.aspx
or any other page from 17,800 pages which google spits on you when you type "DataSourceControl" in.
|
|
|
|
|
Hello all,
our asp.net 1.1 site, in our home page there are few links. that links javascipt written in C#
<br />
objCell.Attributes.Add("onmouseover", "Javascript:moveOver_LeftMenu();");<br />
objCell.Attributes.Add("onmouseout", "Javascript:moveOut_LeftMenu);");<br />
this is working fine for IE6. but problem with it is not working in case of Mozilla firefox browser.
my qtn is how to handle in case of Mozilla.
any sounds or suggestions are appriciated.
regards
GV Ramana
|
|
|
|
|
hi any body use domvalidator control... If yes then how to remove dot from each message...
e.g
Important Messages
* Please enter name on account.
* Please enter billing address.
* Please enter city.
* Please select expiry date
* Please enter credit card number.
* Please enter zip code.
I have to remove star.. from each msg...
Thanks
|
|
|
|
|
Hello Friends
how are you
i have a problem in xslt and xml technologies.
in my ap.net application i have a xml file and an xslt file which cnverts the xml file into html view using an xml control of asp.net.
here i am able to print my html view which is displayed in xml control, which is placed in aspx page.
my problem is how to insert page breaks in xslt file, so that i can print multiple pages with page breaks after every 15 records.
here i am using window.print() to print the document.
kindly help me.
my work was strucked here.
SanJay
|
|
|
|
|
Use the CSS style page-brake-before or page-brake-after.
---
b { font-weight: normal; }
|
|
|
|