|
Hi,
I have a repeater with rows with different values. When i click on a row i have to show div with Repeater row values on it.
Is there anyway to do this using JQuery or Client side functionality?
Help on this really appreciate it.
|
|
|
|
|
Imran. Mohammed wrote: Is there anyway to do this using JQuery or Client side functionality?
Yes
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Can you please let me know how to do this?
|
|
|
|
|
You didn't provide any details at all so it would be difficult to give you any useful example relevant to your solution. For instance, what is in the repeater? Table rows? Button? Image?
<table>
<tr onclick=ShowRow(rowx)>
<td>
<div id=rowx>Some values</div>
</td>
</tr>
</table>
function ShowRow(row)
{
$(row).show()
}
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
My repeater is as below
<br />
<tr><br />
<td class="dataRowTxt" width="110px"><br />
<%# (DataBinder.Eval(Container.DataItem, "Name"))%><br />
</td><br />
<td class="dataRowTxt" width="70px"><br />
<%# (DataBinder.Eval(Container.DataItem, "InterestRate","{0:0.000}%"))%><br />
</td><br />
<td class="dataRowTxt" width="92px"><br />
<asp:LinkButton runat="server" class="dataRowLnk" ><br />
<%# (DataBinder.Eval(Container.DataItem, "MonthlyPayment","{0:C}"))%></asp:LinkButton><br />
</tr><br />
When i click on the link button, i have to show the a div or a modal popup with values (resides at my backend) related to particular row.
Hope you are clear now.
|
|
|
|
|
|
Not from my ass...
I mean to say the data is at server or bind to repeater items.
I have gone through the Jquery dialog, but it doesn't populate the data.
Can you please help me out if you know better way of doing this?
|
|
|
|
|
Of course it doesn't populate anything, it isn't magic.
If you need to retrieve the data from the server, then make an Ajax call. The call could return formatted html to be placed inside the div or return data to be placed in a template.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Can you provide me an example of above functionality?
Thanks in advance !!
|
|
|
|
|
Here[^]
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
I don't understand what your saying... sorry i am a beginner to development.
my problem here is i have a div tag with asp label controls on it. By default i am not going to show it.
On Page Load i will fill the repeater with all the values ( you can say with 3 rows)
Each row contains Details link, if i click on the details link i have to show the div tag. When i am showing the div i have to assign the values related to particular row to labels in my div.
Hope you understand.
|
|
|
|
|
Hi! I think that Mark Nischalke is only playing with you and he isn't seriously at all!
Here[^] is a tutorial that I've made about jQuery, Web Methods and SQL Server Data Populating in Grid View... I hope you know a little of spanish if not, just try to understand and apply to your web site.
Looks like the same procedure but with some changes... hope it helps
|
|
|
|
|
English is the default language here. Creo que es usted quien está jugando.
All of the information has been presented to the OP, learning does more than giving code.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
I didn't ask which language is here!
but thanks
este ud ayudando o no, tampoco me interesa. Solo trato de responder la respuesta a la pregunta anterior, no busco nada mas! gracias
|
|
|
|
|
Hi,
I have a gridview which I dont know the number of columns it is created by a dynamic query and AutoGenerateColumns = true.
I need to put the columns of the gridview in editable mode except the first one for insert the data typed into the database.
Thanks.
|
|
|
|
|
amina89 wrote: I need to put the columns of the gridview in editable mode except the first one for insert the data typed into the database.
Are you trying to ask that you want first row normal and rest of them in editable mode? If so, probably you need to use the RowDataBound event where trap the first row and show it as is and rest of the rows in a Edit mode.
|
|
|
|
|
Hi,
I want to use a gridview to insert student grades for a module (total area unknown) for this i use a dynamic query and I display the gridview
Number students ___subject 1____subject2 ....( subjects of a module) but I can not put the gridview in edit mode ,how do that?
I searched on google but most of the gridview it already knows the number of column so we do not use autogenratecolumn=true which facilitates edit mode and insert the gridview data in the database.
Thanks.
|
|
|
|
|
I am quite new to Javascript and this question probably would seem very basic, but I am really stuck. I have a button. When I click it, the Javascript should cause an alert to display "hello" to the screen. When I build the project I get the error:
'ASP.default_aspx' does not contain a definition for 'Hello' and no extension method 'Hello' accepting a first argument of
type 'ASP.default_aspx' could be found (are you missing a using directive or an assembly reference?)
Aspx:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Test</title>
<script type="text/javascript">
function Hello() {
alert("hello");
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Button ID="Button1" runat="server" Text="Button" onClick="Hello()"/>
</div>
</form>
</body>
</html>
|
|
|
|
|
Change it to OnClientClick="Hello()"
OnClick set like you have it will attempt to call a server side function, i.e. your code behind. Which ain't there! Hence the error makes sense.
|
|
|
|
|
here;
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="WebApplication1.WebForm1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<input id="Submit1" type="submit" value="submit" onclick="return Hello();" />
</div>
</form>
</body>
<script type="text/javascript" language="javascript">
function Hello()
{ alert("Hello"); }
</script>
</html>
|
|
|
|
|
It's just the difference between using a standard html button or an asp.net server button. A button with runat="server" behaves very differently than a normal html button.
|
|
|
|
|
You see this form is supposed to run on server side. So it'll try to call procedures on the server and not the client. If you want to perform this task, you have some options like:
write a function in C# on server side like this
public void Hello()
{MessageBox.Show("Hello World")}
or do not use an asp button. Use HTML button like
<input type="button" onclick="Hello()" />
or as said by somebody above, you can use onClientClick event handler..
Hope this will clarify all your doubts
Don't forget to rate the comments
|
|
|
|
|
Hi
I'm just curious about something. I've recently been playing around with WebRequests and WebResponses. I create a request like so:
WebRequest someRequest = WebRequest.Create("https://blah.blahblah.com/blah/");
Then I retrieve the response stream of that request like so:
Stream objStream = someRequest.GetResponse().GetResponseStream();<br />
StreamReader objReader = new StreamReader(objStream);
This basically returns something like the following:
<div id="main"><div class=header>
<a href='https://www.google.com/accounts/'> <img class=logo
src='https://www.google.com/intl/en/images/logos/accounts_logo.gif'
alt="Google" /> </img> </a></div>
<div id=maincontent>
<table border="0" width="100%" cellpadding=0 cellspacing=0> <tr>
<td width="75%" valign="top"> <div style="font-size:83%;">
<b> A third party service is requesting permission to access your
Google Account.</b><br/><br/>
In order to authorize a third party service to access your account,
you must sign in.</div> </td>
<td style="padding-left: 10px; " valign="top" align="center">
<div id="rhs"> <div id="rhs_login_signup_box">
<script><!--function gaia_onLoginSubmit() {
if (window.gaiacb_onLoginSubmit) { return gaiacb_onLoginSubmit(); } else {
return true; }}--></script><style type="text/css"><!--
div.errormsg { color: red; font-size: smaller; font-family:arial,sans-serif; }
font.errormsg
It basically contains all the website controls etc. My question is, lets say this specific website has a username and password field, is there any way I can edit the above response to navigate my web browser control to the website, populate the username and password boxes and log the user in?
|
|
|
|
|
Your going to have to post back to the server with the values. Check out this article.
Post With C#[^]
If at first you don't succeed ... post it on The Code Project and Pray.
|
|
|
|
|
hi,
am using menu.js to build a menu in an aspx page and am also using prototype.js in the same page and i well know that the use of prototype.js before that menu leads to display the menu in a wrong way in Opera browser where as it work well with IE & Firefox browsers. i need to resolve this with Opera browser inorder to display the menu in a right way as it is shown in other browsers.
Ref Url: http://www.itifsl.cmlinks.co.in/Insurance/Index.aspx.
Kindly help me in getting this problem solved. Thanks in advance.
Regards,
Jayakrishna
|
|
|
|