|
I did it.
|
|
|
|
|
Thanks !
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
The same thing will work here. actually you are not adding it at correct place. First of all, u are adding the attribute to Grid view. In fact when u wanna delete any item then i m sure u have placed some control in each row on clicking of that , that particular item will be deleted.
So if it is a LinkButton/Button in ItemTemplate then you can add the attribute to it onRowDataBound Event or RowCreated Event or OnClientClick Property itself.
<asp:TemplateField HeaderText="Delete" >
<ItemTemplate>
<asp:ImageButton ID="imgbtnDelete" ImageUrl="~/images/delete.jpg" OnClientClick="return confirm('Are you sure you want to delete it ?');"
CommandArgument='<%# Eval("UserId") %>' CommandName="DeleteUser" runat="server" />
</ItemTemplate>
</asp:TemplateField>
OR
ImageButton btn = (ImageButton)(e.Row.FindControl("imgbtnDelete"));
btn.Attributes.Add("OnClientClick","funcationToBecalled();")
|
|
|
|
|
Nisha Agrawal wrote: ImageButton btn = (ImageButton)(e.Row.FindControl("imgbtnDelete"));
btn.Attributes.Add("OnClientClick","funcationToBecalled();")
Hmmm, this is also working. Thanks to u too.
|
|
|
|
|
Then Use Only One ..! Not Both...!
If It Helps Click It as Answer
|
|
|
|
|
ofcourse
|
|
|
|
|
Hi
Update panel in asp.net not working on live server but locally working fine.
how can I make this to be running on live server also even AjaxToolKitControl is installed in live server.
thanks
|
|
|
|
|
Fix your deployment. What else can we say ? Work out what is different between the server and local, and fix it. And when you want help, try to define things like 'not working'.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
As CG said .
What Do You Mean By Not Working..!
How It is Not Working..!
If You Explain May the Group will Help..
1
If It Helps Click It as Answer
|
|
|
|
|
1. Used ASP.NET controls: dropdown and textbox.
2. For the 1st time at page load, some default values should be populated in dropdown and 1st value in text box.
Written the below code
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
DropDownList1.Items.Add("a");
DropDownList1.Items.Add("b");
DropDownList1.Items.Add("c");
TextBox1.Text = DropDownList1.SelectedValue;
}
}
3. Set the autopostback of dropdown=False. So "DropDownList1_SelectedIndexChanged1" will not work. I have done this because after selecting any value in dropdown, post back should not take place.
4. Now we have values in drop down. I want to select a value in dropdown and same selected value should be visible in text box.
I want a java script for this. Not able to write it as not able to find any client event for dropdown.
Actually there is event "onclientclick" for an asp.net button control, but did not find any such event for dropdown.
So how to write java script code.
|
|
|
|
|
BY using ajax, you can get the result.Why dont you try ajax
|
|
|
|
|
Perhaps he cares about writing efficient code that is scalable ?
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Hi
I'm using Calendar.setup to get date in textbox by selecting from calandar in asp.net.
but first time always after loading page it needs to be clicked twice.
but I want calandar on single click on image button.
please find code here:
function showcalander(obj,date)
{
Calendar.setup({
inputField : date, // id of the input field
ifFormat : "%d/%m/%Y", // format of the input field (even if hidden, this format will be honored)
button : obj, // trigger button (well, IMG in our case)
align : "Br", // alignment (defaults to "Bl")
singleClick : true,
: false
});
}
|
|
|
|
|
I think Its Ok With Using .Did U Use For Button Click Like This
<img src="../Img/cal.gif" id="f_triggerDOB_b" onmousedown="initCalc('f_dateDOB_b','f_triggerDOB_b');" />
function initCalc(inputfield,button){
Calendar.setup({
inputField : inputfield,
ifFormat : "%m/%d/%Y %I:%M %p",
showsTime : true,
button : button,
singleClick : true,
step : 1
});
}
But If You r using ajax why to use Third party Control.Did You lokk at this..!
http://www.asp.net/AJAX/AjaxControlToolkit/Samples/Calendar/Calendar.aspx[^]
If It Helps Click It as Answer
|
|
|
|
|
Hi
I wnat to store connection string in different web.config files and those are in diff drives.
how can i find the path of web config file
and may be the locations will be change at deploy machine.
how can i store it.
plz give a solution ASAP.
thanks in advance.
|
|
|
|
|
|
Thanks for reply
Is it possible server.mappath in vb.net 2003.
and
can u give sample code to store and retrive from web.config
here the machines are different.
iam storing from ui page and those values will be stored in more than one web config file in an encripted format.
plzzz help...
|
|
|
|
|
|
here
one web.config file is in one system and another web.config is in another system(PC)
both are having same platform and everything same. those are deploy machines
|
|
|
|
|
what you mean they are in different drives? they can be in sub folder of root. And why you want to get the path for web.config which are in sub-folder?
|
|
|
|
|
hi,
i want to add menustrip tool in master-page in asp.net web application.plzz help me out.
|
|
|
|
|
|
First read the guide on how to ask questions. Then read a book on ASP.NET. Or two. Then perhaps you'll be ready to start writing some basic projects, although you'll be a long way from anything that anyone would pay for.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
how can find out substring in a string
|
|
|
|
|