|
hiiiiiiiii
i have a situation where i have to select a row in gridview on single mouse click and when i click the delete button the selected row should be deleted. on double click only the selected row values should be loaded into the asp controls.for the double click i had written the code in row databound as
e.Row.Attributes["ondblclick"] = (ClientScript.GetPostBackClientHyperlink(this.gv1_Country, "SELECT$" + e.Row.RowIndex));
and by this i stopped the single mouse click to the datagrid.
when coming to single mouse click i had taken a hiddenfeild value and i want to assign the selected row primary key to that hidenfeild value.
for that i had written the code in row databound as
e.Row.Attributes.Add("onclick", "document.getElementById('hiddenfeildid').value=this.rowIndex");
and now the selected row index value is not coming into the hiddenfeild value.....
i hope all u understood my problem...
anyone kindly help me.............
Thanks in Advance....
VISHNU
|
|
|
|
|
vishnukamath wrote: e.Row.Attributes.Add("onclick", "document.getElementById('hiddenfeildid').value=this.rowIndex");
Are you sure this line is correct from Javascript prospective? It might be that the hidden field used is a server field (to use it in code behind) and so the actual id of the field when page renders is not just 'hiddenfield'.
2 things:
1. try an alert box first. Popup the alert(this.rowindex);
2. Do a view source and check what is the ID of the hidden field. If step 1 works above as expected then replace the ID with what you find in viewsource.
|
|
|
|
|
Hi Vishnu,
Please take 2 seperate button fields i.e. 1)Edit button 2)Delete Button. I think it'll be easy for u to code for actions.
|
|
|
|
|
I am creating a report using rdlc files. I want page break at the end of a group , but not at the end of last one.I googled a lot.After 2 hrs of googling i dint found any correct solution....
In my example ,there is a lot of records.After 20 records,it will have to throw balance records to next page.I hav already put the condition for page break.It showed only 20 records.Please help me..Please reply fast..
|
|
|
|
|
Thanusree Duth wrote: Please reply fast..
Avoid it from next time!
Thanusree Duth wrote: I want page break at the end of a group , but not at the end of last one
It won't give a break at the end. Though you question sound incomplete, only reason to post/ask such thing could be getting a blank page after last page break at the end. If so, then it would be because of some extra space at the end in your report designer.
If this is not the case, update the question with more details.
|
|
|
|
|
i'm looking for something related to...
i would like to force pagebreak while grouping..
eg:
only 20 records per page
or
page break when specific_expression == true..
Pat
|
|
|
|
|
Hi,
First, I apologize for the bad title of the message, but the truth is that I don't have a name for this question
I've got my website http://www.mysite.com hosted on a server that does daily backup.
When I upload files to my website using an FTP client in the root folder I see 2 folders:
mysite.com (my site)
mysite.com_backup (backup)
So the URL http://www.mysite.com maps to /mysite.com/ on the server.
My question is: using VB.NET or C#, is there a way to know the virtual server path of an URL (obviously having the credentials to connect to the server)???????
http://www.mysite.com --> /mysite.com/
How to do this???
Thanks to all.
|
|
|
|
|
hmm.. I don't think you're entirely clear about what you're after, but you might want to lok at either the Request.ServerVariables collection (try Request.ServerVariables("PATH_TRANSLATED") for starters...) and/or the Server.MapPath method....
|
|
|
|
|
I'm not looking for the phisical path of the page (I know it's D:\inetpub\wwwroot\... and something else, on my server).
What I'm looking for is the virtual path of the server the maps to the site homepage.
I don't know if I'm so clear, so see this image: http://www.marcosroom.it/nosito/filezilla.bmp
My site is http://www.marcosroom.it and its files are in the /marcosroom.it/ directory of the server (red circle), while the server root (/) contains 3 folders and just one is the real website (blue rectangle).
So my question is: is there a way to know the server virtual path (red circle) of the homepage of the site, knowing just the ftp login data???
|
|
|
|
|
Sorry, you've lost me. But no server-side code can access filesystem information outside of the root folder of your site.
|
|
|
|
|
|
Hi Guys, I am new in MVC and reading book. I follow his example but after running I faced with error, I can't run the page. Could you please check the following code and tell me was the problem.
thx in advance
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<MvcApplication1.Models.GuestResponse>" %><br />
<br />
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><br />
<br />
<html xmlns="http://www.w3.org/1999/xhtml" ><br />
<head runat="server"><br />
<title>RsvpForm</title><br />
</head><br />
<body><br />
<br />
<%using (Html.BeginForm()){ %><br />
<p>Your Name:<%:Html.TextBoxFor(x=> x.Name) %></p><br />
<p>Your Email:<%:Html.TextBoxFor(x=> x.Email) %></p><br />
<p>Your Phone:<%:Html.TextBoxFor(x=> x.Phone) %></p><br />
<p><br />
will you attend?<br />
<%Html.DropDownListFor(x=> x.Attend, <br />
new SelectListItem {Text = "Yes", Value = bool.TrueString} <br />
new SelectListItem {Text = "No", Value = bool.FalseString} <br />
}, "choose an option") %><br />
<br />
</p><br />
<input type = "submit" value= "submit RSVP" /><br />
<br />
</body><br />
</html><br />
after running page, error appear from this line
Line 18: new SelectListItem {Text = "Yes", Value = bool.TrueString}
|
|
|
|
|
Member 4674360 wrote: error appear
|
|
|
|
|
Hi Everyone,
I am wondering if we could do something like this:
well lets say my tag is like this:
<%# DataBinder.Eval(Container.DataItem,"Item")%>
let say it gives value like this:
book
Now if i need to show the output like this:
(book)
Is there any way that i can show using string format?
suchita
|
|
|
|
|
try this
<%# Eval("Item") != "" ? "("+ Eval("Item")+")" : Eval("Item").ToString()%>
|
|
|
|
|
|
This is completely unnecessary, inefficient and ugly code.
See below.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
<%# DataBinder.Eval(Container.DataItem, "Item", "({0})") %>
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
|
Hello friends,
I have a major problem, so please help me.
i have created a web application in asp.net with c# in 2005.
now i want to create my application in more than one language.
and i want to change language with the help of the language files (e.g XML files or database).
so anybody have the idea that how i can achieve my goal, if you have any demo project then please send me on my mail-id (ajeet.gimt@gmail.com).
so Anybody can help me , i will be very thankful to him .
Thanks in advance .
|
|
|
|
|
|
Hi all
Whenever I change text in a textbox i need to differentiate between two methods of doing this
1. Enter text
2. select a value from list of previously saved values and press Enter key. One thing to note here is that TextChanged event is not fired when a value from the previously saved values is selected if we are using IE.
Any help in this regards ?
Regards
Zain ul Abideen
|
|
|
|
|
Are you looking for AutoComplete Textbox control? Its there with asp.net ajax control.
Pls be sure to make AutoPostback property to false if you don't wish to post back on every text change.
please let us know if you are looking for something else.
|
|
|
|
|
Hi
No I don't need an ajax control.
Actually I have implemented a textchange event for a textbox and it is fired whenever text is changed by: 1. entering text and hitting Enter
2. entering text and then clicking somewhere else on the form
But I need to differentiate between these two scenarios.
for (1) I have to fire a button's click event and for (2) Enable a button.
Thanks for replying.
Regards,
|
|
|
|
|
These are two separate events. Pressing the Enter key is handled by the KeyXXX (KeyDown, KeyUp, KeyPress) events. Clicking elsewhere on the form is handled by the LostFocus event, or OnBlur in JavaScript.
I know the language. I've read a book. - _Madmatt
|
|
|
|