|
My datagrid is bind with a datasource.
Now I need to add a number of rows dynamically to the datagrid, where rows contains controls. How to do this?
Help kindly appreciated.
Thanks.
The Phantom.
|
|
|
|
|
|
Hi everybody
I have datalist who have it inside ImagineButton.
protected void list_SelectedIndexChanged(object sender, EventArgs e)
{
int name=list.SelectedItemStyle.te
}
<asp:datalist id="list" runat="server" onselectedindexchanged="list_SelectedIndexChanged">
<itemtemplate>
<asp:imagebutton id="ImgBtnBanner"
="" tooltip="<%#Eval("Title") %>" imageurl="<%#Eval("ImageUrl") %>" postbackurl="<%#@"http://"+Eval("LinkUrl") %>" runat="server" cssclass="ImgBanner" alternatetext="<%#Eval("Id_banner") %>">
How can catch the clicked button.Please help me.
Good bye and hava a nice day.
when i want to read something good just seat and type it
|
|
|
|
|
I am looking for a code in javascript which does not allow decimal values in the Telephone No. field(i.e textbox)
Thanks & regards,
Suresh Dayma
Everything Is Possible!
|
|
|
|
|
function KeyCheck(myfield,e)
{
var keycode;
if (window.event) keycode = window.event.keyCode;
else if (e) keycode = e.which;
else return true;
if (((keycode>47) && (keycode<58) ) || (keycode==8)) { return true; }
else return false;
}
You can use this function for keypress so that it will not allow u to put any characters but only numeric.
If you have a HTML control then call this function by onkeypress="return KeyCheck(this,event);"
Else on server side code write TxtPhone.Attributes.Add("onkeypress","return KeyCheck(this,event)");
Vicky
"Walking on water and developing Software on a specification is easy, if
both are frozen..."
|
|
|
|
|
Thanks for your help....
Thanks & regards,
Suresh Dayma
Everything Is Possible!
|
|
|
|
|
how can i create a session in asp.net2005 using c#
dcjoshi2
|
|
|
|
|
Every time an user open your site on a browser window, it create a session automatically
Create a session variable with the user Id
string userId = (to consult the database)....
Session["userId"] = userId;
Check the session State
string stateSession = Session.Mode.ToString();
write these lines on all onload process pages in order to check if the session dont time out
<br />
try<br />
{<br />
string isAlive = Session["userId"].ToString();<br />
}<br />
catch(Exception)
{<br />
Response.Redirect("error.aspx");
}<br />
Ojala sea lo que buscas
i hope it was what you looking for
keep Learning and you never will be out of date...
|
|
|
|
|
hi
can any one give me the code for deletecommand event of the asp.net datagrid. iam displaying data from sqlserver.when i clicked the delete link of a particular row.that record should be deleted.
thanks
vijay
|
|
|
|
|
you know, Its a basic cuestion, everyone who developed a website has working that
but dont worry let me help you
delete Command using Sql query
<br />
private void DataGrid_DeleteCommand(object source, System.Web.UI.WebControls.DataGridCommandEventArgs e)<br />
{<br />
string userId = DataGrid.DataKeys[e.Item.ItemIndex].ToString();<br />
string query = "DELETE FROM users WHERE Id = '" + userId + "'";<br />
SqlCommand commandSql = new SqlCommand(query, conection);<br />
vG.conexion.Open();<br />
comandoSql.ExecuteNonQuery();<br />
vG.conexion.Close();<br />
}<br />
using dataSet synchronization
<br />
<br />
private void DataGrid_DeleteCommand(object source, System.Web.UI.WebControls.DataGridCommandEventArgs e)<br />
{<br />
DataSet dS = new DataSet();<br />
SqlDataAdapter dA = new SqlDataAdapter();<br />
string query = "SELECT * FROM users";<br />
SqlCommand commandSql = new SqlCommand(query, conection);<br />
dA.SelectCommand = comandSql;<br />
dA.Fill(dS);<br />
SqlCommandBuilder sCB = new SqlCommandBuilder(dA);<br />
dS.Tables[0].Rows[e.Item.ItemIndex].Delete();<br />
dA.Update(dS);<br />
Response.Redirect("Usuario_delete_ok.aspx");<br />
}<br />
keep Learning and you never will be out of date...
|
|
|
|
|
Is this for an exam that you should have studied for?
---
b { font-weight: normal; }
|
|
|
|
|
|
No more silly than your subject line and 1 line question (which can be answered using some simple searching)
|
|
|
|
|
r u an student or an developer.
With Regards
Satips
|
|
|
|
|
hai,
i am having a serious problem of session expiry in the remote server.
i am using asp.net +vb.net
i hav set the session expiry as 75min in the web.config but is getting only
15min.
How could i increase the session timeout at the remote server
plz reply ASAP
Nithin
|
|
|
|
|
have you tried timeOut in Web.config
|
|
|
|
|
i hav tried that but its not working
Nithin
|
|
|
|
|
hi,
i have several DDL in my page if i choose one item from a dropdownlist1 list then the relevant items are populated to the second dropdownlist2 list.
what my problem is according to some condition i have choosed values for some of the dropdownlist1,so that relevant dropdownlist 2 DDL should have list.
i done this with Ajax abd asp.
but when i choose the values for DDL1 list onload then he values are not coming for all the DDL only im getting for the last box.
all other box ready state not getting into 4.
someone please help about this issue.
with regards,
susa
|
|
|
|
|
Hi everybody ,
Can anybody tell me , how to find printer status in aspx page ? using VB language .Is there any method/event or inbuilt library to check it on web-page?
Thanking you.
param
param
|
|
|
|
|
Hi,
There is a rule/checkpoint in Accessibility which says that a Web page should work even when Javascript is disabled.
Currently the MouseOver effect functionality in a Web page is achieved by using "onMouseOver && onMouseOut" in javascript. Is there a way in which MouseOver && MouseOut functionality can be provided without using Javascript?
Please let me know.
Thanks in advance
Narendra
|
|
|
|
|
What does the mouseover/mouseout achieve?
If it is merely changing colors/layout then you could use CSS with a "hover" selector.
If it is context-help, then you could make links beside every rollover place where the user could get the same information.
Kind regards - Jakob
*********************************************
Three kinds of people in the world:
- Those who can count..
- Those who can't!
10 kinds of people in the world:
- Those who understand binary
- Those who don't
|
|
|
|
|
Hi,
There is a rule/checkpoint in Accessibility which says that a Web page should work even when Javascript is disabled.
Currently the Close functionality in a Web page is achieved by using "Window.Close()" in javascript. Is there a way in which Close functionality can be provided without uing Javascript? (other than using Close available in File Menu)
Please let me know.
Thanks in advance
Narendra
|
|
|
|
|
whn i update a row in database thru asp.net2005 web page thn the data update successfully but whn i click after tht updation in "Refresh" button into Internet explorer thn tht particular row update again.so how can i prevent this situtation.
-- modified at 4:50 Thursday 21st September, 2006
dcjoshi2
|
|
|
|
|
Hi,
so what u basically need is to detect a page refresh and avoid the subsequent update. Refer this link- http://www.codeproject.com/aspnet/Detecting_Refresh.asp
hope this helps you.
"If A is success in life, then A equals x plus y plus z. Work is x; y is play; and z is keeping your mouth shut." - Albert Einstein
|
|
|
|
|
there are three solutions
first one
use the negation ispostback command at load page
if(!IsPostBack)
{
update()
}
Second one
open a new page when the update process is already done
update()
response.redirect("update_ok.aspx",true);
third one
open your site onto a browser page whitout browsers bars, use a javascript function
keep Learning and you never will be out of date...
|
|
|
|