|
This is not a good approach. Keep it in mind, RowDataBound event will be fired when each row is bounded with the value. A better approach would be
protected void Gridview4_RowDataBound(object sender, GridViewRowEventArgs e)
{
HyperLink hyp = e.Row.FindControl("hyperlink") as HyperLink;
hyp.Enabled = false;
} GridViewRowEventArgs has a Row property which refers the current row which is binding. You can use that instead of looping through the entire gridview.
|
|
|
|
|
in my asp.net application,i have a manu javascript in a user control.when ever onclick ,it s directed to other aspx forms.for this i am using the script:
var menu1=new Array()//for payroll
menu1[0]='Payroll management'
menu1[1]='Payroll Compensation'
i want to open the aspx page in a seperate new window. how can i do this?
also i am using a seperate msi also in this project.For that also i am giving the same script:
var menu8=new Array()//for Mail
menu8[0]='a href="httprequest/Start.aspx">e-mail'
Its working fine,but i have to click back button in the browser to go my application again.so i want to open this msi also in a seperate new window.what is the script for that..?
|
|
|
|
|
Hi,
u can use "target" property of anchor tag, like this,
Below is yr code :
var menu8=new Array()//for Mail
menu8[0]='a href="httprequest/Start.aspx">e-mail'
-- just change yr code like this....
var menu8=new Array()//for Mail
menu8[0]='a target="_blank" href="httprequest/Start.aspx">e-mail'
I hope it will help u...
Regards
Rana Krishnraj
|
|
|
|
|
System.Web.Mail.SmtpMail.Send ("senderID@domainName.com",
"receiverID@domainName.com","Subject of the Mail",
"Message Body");
I am using SmtpMail in the above manner for sending email. I gave my emailid as receiver address. Eventhough it is showing a success message, when I open my Inbox, it is not there. Why?
Thanks in advance.
|
|
|
|
|
Unless you are still using .NET 1.1, you should use the System.Net.Mail[^] classes instead. The System.Web.Mail classes are marked as obsolete in Framework v2.0+.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
Adding to what Paul said - Your code use local SMTP to send mails. So if it is stopped or not configured correctly, your mails won't get delivered. Look in the PickUp directory or in BadMail directory in MailRoot folder. If mail sending failed, it will be moved to the bad mail directory.
|
|
|
|
|
hi all,
how to track online visitors ip address and country name through ip address of those who are visiting my web site in asp.net.....
Ashok
modified on Wednesday, April 2, 2008 2:44 AM
|
|
|
|
|
You can check the Request object to get the IP address Request.UserHostAddress but don't know how to get the counrty name
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... "
|
|
|
|
|
Ip address is in Request.HostAddress . You can use GeoIp library to query the IP address and get the location.
|
|
|
|
|
Hi guys, how can i get the linkbutton text assigned value whatever is in the str on the clickme event
string str="hello";
<asp:LinkButton ID="lnk" OnClick="clickme" runat="server"><%=str%></asp:LinkButton>
thanks
|
|
|
|
|
Could you explain in detail what you have to achieve ?
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... "
|
|
|
|
|
|
Hi, I'm hoping someone can help me figure this out. I'm trying to retrieve entire web pages via httpwebrequest so I can parse through the links. Some of the links on the pages I'm accessing are generated through javascript (and consequently don't appear in the source). Is there a way to access these links using .NET? I have no problem retrieving the non-javascript-generated content.
|
|
|
|
|
As the Javsacript content is going to generate at client side (in Browser)
and you are getting the whole page using httpwebrequest so can't get the javascript genearsted content.
Another way is just check what javascript is doing by downloading the javascript files and try to escalate the things
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... "
|
|
|
|
|
Right. Is there a way to programmatically access the client-side content?
|
|
|
|
|
hi all i am working on audio i have all songs on server and name list in database on page load i am listing list of songs now if user select 3 songs and clcik on play i want to buffer these songs while playing so it will work fast also like we see on othe song's site so how to implemnet buffering task in asp.net
Thanks & Regards,
Prashant B. Lavate
Software Engineer
Mobile : +919423872257
Pune(India)
|
|
|
|
|
Did you consider using Media Services?
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|
|
Dear All
I have to Search the text inside the database for my website(asp.net) based on keywords (not by %like query), I can't got how can I achieve this.
On googling I found integration of Indexing server and sqlserver accomplish this but till not sure.
Any helps are highly accepted with suggestion links and comments.
Thanks
|
|
|
|
|
|
Hi, I'm just wondering if there's an ASP.NET data presentation control out there for data nested to an arbitrary depth i.e., a self-referencing table e.g., [Employees and their supervisors --> and tb_employee.supervisor_id references tb_employee.id] or [Categories and sub-categories --> tb_category.parent_id references tb_category.category_id, if top level it's set to null or 0].
Somewhat like a cross between a TreeView and Repeater.
TreeView comes close but you can only bind text and value...
Like a nested Repeater/GridView/DataGrid (take your pick) with the nested aspect being implicit.
I hope I'm being clear enough.
If as I suspect there isn't such a .NET control any advice is welcome.
|
|
|
|
|
There isn't any inbuilt .NET control. If you are just displaying the data, I recommend using repeater and nesting it. It's fast and you will get more control on the HTML.
|
|
|
|
|
Metal
---Gold
---Silver
---Bronze
Wood
---Oak
------Oak1
---Maple
Since the nesting levels are arbitrary I'd have to add the repeaters programmatically. I've had trouble with postback trying to do that in the past.
|
|
|
|
|
loupceuxl wrote: I've had trouble with postback trying to do that in the past.
Are you trying to display the data or you need your control to post back ? Have a look at here[^] to see nesting with repeater. This[^] also gives an insight to extending repeater. Repeater class is not sealed, hence you can create your own class which inherits from Repeater . Provide nesting functionalities to the custom created control
Hope this helps
|
|
|
|
|
Yeah, I've done this before when I knew how many levels of nesting there were going to be, usually 2 or 3. Although, unlike this example I wrote most of my code in the .cs page inside the OnItemDataBound event.
I'm looking for something where the following is NOT applicable:
"The data source must be regular in shape—it is not feasible to bind to a data source that is 2 levels deep in some places and 4 or 5 levels deep in others."
But that link you sent me is pointing in another direction, gonna check it out. Thx .
|
|
|
|
|
loupceuxl wrote: The data source must be regular in shape—it is not feasible to bind to a data source that is 2 levels deep in some places and 4 or 5 levels deep in others."
As I said go for custom control extending from Repeater.
loupceuxl wrote: But that link you sent me is pointing in another direction, gonna check it out. Thx .
Glad to know that it helped.
|
|
|
|