|
hi,
i have the 5 textboxes and 5buttons(all are html controls)
ids are
textbox1-button1
textbox2-button2
all these controls are coming dynamicaly
like that all
if i click the button1 then txtbox1 value has to be displayed ..simlar for all
how can i do this ina javascript
|
|
|
|
|
hi
give the ids to your html control
go to html part of page
select the particular control and event from dropown
from up side of page
and write the code
in event
alert(docuement.getelementbyid('ur controls id').value)
|
|
|
|
|
hello,
how can i get the value of tetbox1 for button1 click and value of textbox2 for button2 click... all these(controls) are coming dynamically...
see this way i have given the ids to controls..
<% for (int i=0; i<_nRowCount; i++) {%>
<% } %>
<asp:button id="btn_CreateRow" onclick="OnCreateRow" runat="server" text="AddNew">
|
|
|
|
|
beklo.com/rameshgoudd wrote: type=button value=Save önclick=TestServer(this.id)
You need to pass textbox id's also to this function.
|
|
|
|
|
k...........but i how can get the textbox value for related button click event
|
|
|
|
|
As I told, you have to pass both text box id's. Already you have defined a javascript method to handle button click. So what's the problem ? To get values of text box, use getElementById() to find the texbox object and get value.
|
|
|
|
|
u can give the clientid
when u create it dynamically
|
|
|
|
|
Hi ,
while creating button add the java script method and map it to onclick()
event().In that javascript function add the functionality to get the value of the textbox.
The Javascript function
function fun()
{
button1.value = document.getElementById("textboxid").Value;
}
hi ! i am working in a MNC and i lov programming
|
|
|
|
|
We developed a website using .Net 2.0, we run the system on IE7 operating system Windows XP, we use the CSS to format the style of the text, it look fine. But when we run the website on IE7 operating system windows vista the CSS format did not take effect on the text. Is there any bugs on Windows Vista
|
|
|
|
|
vanhawk wrote: Is there any bugs on Windows Vista
No. It will be your CSS referring problem. Ensure that you are following W3C standard.
|
|
|
|
|
The design of the page work properly on IE7 operating system Windows XP, but on IE7 operating system Windows Vista the CSS did not work properly. Till now I'm still thinking that we the same code and the same IE browser which is IE7 the only diffirence is the Operating System.
|
|
|
|
|
vanhawk wrote: IE7 operating system windows vista the CSS format did not take effect
yea there are some bugs in IE7 with CSS for your reference you can follow the below link
IE7_CSS[^]
Regards,
Sandeep Kumar.V
|
|
|
|
|
How a crystal report program in .net web application is run ,it will display in word format not to export into a directory.simply when we run it will display in word format
-- modified at 1:34 Wednesday 17th October, 2007
|
|
|
|
|
in email checking the user id is encrypted and display in the addressbar of the browser.how it will be possible in the .net programming.please mail the source code for encrypting the name of a user syored in the database when he logs in
Sreejith
|
|
|
|
|
SreejithAchutan wrote: in email checking the user id is encrypted and display in the addressbar of the browser.
.NET comes with powerful encrypion libraries. Use System.Cryptograhy namespace.
|
|
|
|
|
I'm learning ASP .NET 2.0. I have a question about the DataGrid (gridview) component. I am working on a simple project where I would like to have a textbox where a user can update hours. Is it possible for every row to have a text box there so anyone can change several hours for each row and save them all at once? That way, no one would have to click edit, and then update for each row. This is the only field editable on this page. Thanks for you input.
|
|
|
|
|
Also, I would like to have concurrency to be able to still be used.
|
|
|
|
|
yes u can do it by custom code.
dont use the update option of gridview. place a button in the page and in
button clik u can write sql query to insert values in each row to dbase by looping thru the rows in the gridview.. u can ,make use of SqlTransaction to insert all the records in a transaction.
foreach(GridviewRow gv in Gridview1.Rows)
{
// write code for inserting values into database from each row
}
CST
|
|
|
|
|
Ok, from there, how would you have that one field editable via a non-read only text box?
|
|
|
|
|
could u explain?? place textbox in templatefield of gridview. then u can edit..
CST
|
|
|
|
|
Yes sorry , I want the user to be able to make a bulk edit as it were. The gridview way that I know, you have to edit one row at a time by clicking the edit button. Is there a way to make all of the textboxes editable or will your suggestion work?
|
|
|
|
|
I am new to this .net, I need some help how to edit the gridview. I want to updata the data in the gridview
when I click the button in the gridview it is going back to the fornt page.
I want to do everything in the code manually.
Can some one help me on this?
<asp:GridView ID="GridView1" runat="server" AllowSorting="True" AutoGenerateColumns="False" AutoGenerateEditButton="True"
BackColor="White" BorderColor="#3366CC" BorderStyle="None" BorderWidth="1px"
CellPadding="4" ShowFooter="True">
<FooterStyle BackColor="#99CCCC" ForeColor="#003399" />
<RowStyle BackColor="White" ForeColor="#003399" />
<PagerStyle BackColor="#99CCCC" ForeColor="#003399" HorizontalAlign="Left" />
<SelectedRowStyle BackColor="#009999" Font-Bold="True" ForeColor="#CCFF99" />
<HeaderStyle BackColor="#003388" Font-Bold="True" ForeColor="#CCCCFF" />
<Columns>
<asp:BoundField DataField="PDate" HeaderText="Date" />
<asp:BoundField DataField="Time2" HeaderText="TimeIn" HtmlEncode="False" DataFormatString="{0:t}" />
<asp:BoundField DataField="TIN" HeaderText="In" />
<asp:BoundField DataField="Time1" HeaderText="TimeOUT" HtmlEncode="False" DataFormatString="{0:t}" />
<asp:BoundField DataField="TOUT" HeaderText="OUT" />
<asp:TemplateField HeaderText="Comments">
<ItemTemplate>
<asp:Label ID="Label2" runat="server" Text='<%# Bind("OutComm") %>'></asp:Label>
</ItemTemplate>
<FooterTemplate>
<asp:Label ID="Label7" Text="Total:" Font-Bold="True" Width="50" BorderStyle="Solid"
BorderWidth="0" Style="padding:2px; margin-top:5px" runat = "Server"/><br />
<asp:Label ID="Label4" Text="Overtime:" Font-Bold="True" Width="50" BorderStyle="Solid"
BorderWidth="0" Style="padding:2px; margin-top:5px" Runat="Server"/>
</FooterTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="TotalTime">
<ItemTemplate>
<asp:Label ID="Label3" Text='<%# FormatNumber(Get_Time(Eval("TotalTime"))) %>' Runat="Server"/>
</ItemTemplate>
<FooterTemplate>
<asp:Label id="TotalTime" Text='<%# FormatNumber(Get_Total_Time()) %>' Width="80" Runat="Server"
Font-Bold="True" BorderStyle="Solid" BorderWidth="1" BorderColor="#C0C0C0"
Style="padding:2px; margin-top:5px"/><br />
<asp:Label ID="Label5" Text='<%# FormatNumber(Get_Over_Time()) %>' Runat="Server"/>
</FooterTemplate>
<ItemStyle HorizontalAlign="Right" />
<FooterStyle BorderWidth="0px" Font-Bold="True" HorizontalAlign="Right" />
</asp:TemplateField>
</Columns>
</asp:GridView>
|
|
|
|
|
I have an System.Drawing.Bitmap object in memory that I have generated. I need to display this without writing the file to disk or uploading to a database somewhere. Normally I know I could write a binary stream using a Response object, but that is not available to me as I am doing this as a webpart, and all I have available is a HtmlTextWriter.
So I have a method like
<br />
public Bitmap createGraph() {<br />
}<br />
<br />
<br />
protected override void RenderChildren(HtmlTextWriter writer) {<br />
base.RenderChildren(writer);<br />
Bitmap graph = this.createGraph();<br />
}<br />
Thanks in advance.
|
|
|
|
|
The only way I know of, is to do a binary write, which only works if you set the mime type and all you send is the image ( not embedded in the page with other things )
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I am displaying other elements on the page as well. Do you think the only way is to ship the Bitmap to a database as jpeg, and then read it back? Seems slow and counter intuitive to do it that way?
Ideas?
thanks
|
|
|
|