|
I think you can also use:
<form id="form1" runat="server" defaultbutton="sendButton">
If you're using master pages, you have to set the default button for each page manually like this (in you Page Load handler):
HtmlForm frm = (HtmlForm)Master.FindControl("form1");
frm.DefaultButton = sendButton.UniqueID;
Worth a shot anyway.
- S
50 cups of coffee and you know it's on!
A post a day, keeps the white coats away!
|
|
|
|
|
|
Maybe post on main thread....
- S
50 cups of coffee and you know it's on!
A post a day, keeps the white coats away!
|
|
|
|
|
Steve Echols wrote: If you're using master pages, you have to set the default button for each page manually like this (in you Page Load handler):
HtmlForm frm = (HtmlForm)Master.FindControl("form1");
frm.DefaultButton = sendButton.UniqueID;
Thank you, 'S'. You are right.
[Adrián Córdoba]
|
|
|
|
|
Here is what i have
< UpdatePanel >
<dynamically added="" user="" control="">
< UpdatePanel >
all updatepanels are set to conditional
For some reason when i click the button the button click event does not fire. Thank you ahead of time for your healp.
|
|
|
|
|
From where I can Start to Learn .Net 3.0?
|
|
|
|
|
English tourist to local Irishman: Excuse me my good man, how do I get to Dublin from here?
Irishman to English tourist: Oh, if I was you, I wouldn't start from here!
|
|
|
|
|
Hi
I just installed VS2008, im having problems with the design and source view
I opened a web project i had developed in VS2005
When trying to modify the text on the page and then changed to source view, i noticed that the text had been changed (a part was lost and oter part was moved), also something weird happen to an html image that i had inside a hyperlink control
This page is using a masterpage, i also noticed how the layout f the masterpage was changing, this is really weird since one cant change the layout of the masterpage from the contentpage (in design)
Has anyone else have any problems or weird behavior??
My version is: 9.0.21022.8 RTM
Trial version
Thanks in advance for any comments
Alexei Rodriguez
|
|
|
|
|
hi
i am using asp.net and on linkbutton click i call a javascript to open abc.aspx page in new window and in this form i add data from mydatabase and then i say response.redirect after adding record in database but page is open in new page.
while i want to show only one message after add data in database datasuccessfully added and after that window will closed?
please solve my problem
I will do my best?
Integrated Solutions, Bikaner (Raj.), India
|
|
|
|
|
Page.RegisterStartupScript("myrest", "alert('Hello');");
use this after record insertion.
your's subbu
|
|
|
|
|
include the below code in ur head tag
<base target="_self" />
If U Get Errors U Will Learn
If U Don't Get Errors U Have Learnt
|
|
|
|
|
While Reading 1005 records from Excel2000 through asp.net,c# application. inside the application two sp are called for 1005 times.
I get the following errors "SQL Server does not exist or access denied ,ConnectionOpen (Connect()).".
While reading 850 records from excel 2000 it's working fine and two sp are called 850 times.
Thanks in Advance
Senthilkumar.T
|
|
|
|
|
Are you trying to open new connection every time you read a row in excel. if yes try opening single connection at first and use the connection everywhere.
Venky
|
|
|
|
|
On my page i've a gridview, in that i've 3 template columns and in each template column i've a checkbox. If the user wants to select morethan one check box in a row, the previously checked check box should be unchecked.
Is there any solution like; If we use radio buttons in place of check boxes we can set Groupname property.But when we use checkbox is there any property like that? If not how we can achieve this functionality.
Plz excuse me if any gramitical mistakes.
Thanks in advance.
My Mail id avidadi2002@gmail.com
|
|
|
|
|
Write a javascript function and put code in code behind to call the method. I didn't try this code, I'm just giving you and idea off the top of my head on how to do it. I'm not going to take the time to get it all working but just so you get the idea of how to do it.
<br />
javascript EG<br />
<br />
fucntion uncheckBoxes(value, id1, id2)<br />
{<br />
if (value)<br />
{<br />
document.getElementById(id1).checked = false;<br />
document.getElementById(id2).checked = false;<br />
}<br />
}<br />
<br />
<br />
protected void gridRowBound(object sender, System.Web.UI.WebControls.GridViewRowEventArgs e)<br />
{<br />
<br />
<br />
if (e.Row.RowType == DataControlRowType.DataRow)<br />
{<br />
Checkbox1 = (Checkbox)e.Row.FindContrl("cb1");<br />
Checkbox2 = (Checkbox)e.Row.FindContrl("cb2");<br />
Checkbox3 = (Checkbox)e.Row.FindContrl("cb3");<br />
<br />
CheckBox1.attributes.add(onclick, "uncheckBoxes(this.value, '" + Checkbox2.clientId + "', "' + Checkbox3.clientId + "');";<br />
<br />
}<br />
}<br />
<br />
<br />
I didn't get any requirements for the signature
|
|
|
|
|
Thankyou very much Mr.ToddHileHoffer. This working fine.
|
|
|
|
|
Instead of adding 3 columns with 1 checkbox each, add one column with a radiobuttonlist containing the options of the 3 columns with the checkboxes
Alexei Rodriguez
|
|
|
|
|
Hi,
Can abyone knows how to do custom pagination in datalist with out using viewstate.
asp.net 2.0 and c#
Regards
Subash
Subash
|
|
|
|
|
I have a GridView in an Updatepanel. When the page loads, it populates itself from the specified LINQ datasource. How do I make a GridView repopulate itself programatically?
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Repopulate automatically? You can use a timer control which comes with the AJAX toolkit. Handle it's Tick event and rebind your gridview. Checck this[^]
|
|
|
|
|
I didn't say "automatically - I said "programatically". When the user clicks a button to submit data, I want the gridview to show the new data. I tried calling DataBind() after calling SubmitChanges() , but nothing happened on the page.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
John Simmons / outlaw programmer wrote: I didn't say "automatically - I said "programatically"
Hmmm, he should have read more carefully before posting
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
John Simmons / outlaw programmer wrote: I didn't say "automatically - I said "programatically"
Yeah, my mistake.
John Simmons / outlaw programmer wrote: When the user clicks a button to submit data, I want the gridview to show the new data. I tried calling DataBind()
Use triggers in the update panel. Assume you have button named "btnSubmit", the trigger can be written like
<Triggers>
<asp:AsyncPostBackTrigger ControlID="btnSubmit" />
</Triggers> In the "btnSubmit"'s click event handler,
yourGrid.DataSource = GetValues();
yourGrid.DataBind();
You have to use this kind of triggering only if the button is placed outside of updatepanel If button is inside the panel, you don't need to write these kind of triggering. It will be handled automatically.
|
|
|
|
|
hello friend
i am working on card reader detection.Card reader have multiple port.
i found all the port names(ex:-A,C,D,E)
which have Memory Card. but blank Card reader drive name not detected.
How i find blank card reader drive Name.Please Help me
cODE:-
public string[] getLogicalUsbDisks()
{
int i = 0;
string[] lista;
Console.WriteLine("fetching logical disks...");
try
{
ManagementObjectCollection drives = new ManagementObjectSearcher(
"SELECT Caption, DeviceID,Name FROM Win32_DiskDrive WHERE InterfaceType='USB'").Get();
foreach (ManagementObject k in drives)
{
string ddd = k["DeviceName"].ToString();
Core.DriveManager _DManager = new Core.DriveManager();
_DManager.GetDriveLetterFromDisk(ddd);
}
lista = new string[drives.Count];
// browse all USB WMI physical disks
foreach (ManagementObject drive in drives)
{
// browse all USB WMI physical disks
foreach (ManagementObject partition in new ManagementObjectSearcher(
"ASSOCIATORS OF {Win32_DiskDrive.DeviceID='"
+ drive["DeviceID"]
+ "'} WHERE AssocClass = Win32_DiskDriveToDiskPartition").Get())
{
string dd = partition["Name"].ToString(); // browse all USB WMI physical disks
foreach (ManagementObject disk in new ManagementObjectSearcher(
"ASSOCIATORS OF {Win32_DiskPartition.DeviceID='"
+ partition["DeviceID"]
+ "'} WHERE AssocClass = Win32_LogicalDiskToPartition").Get())
{
string djd = partition["DeviceID"].ToString();
string gg = disk["Name"].ToString();
lista[i] = disk["CAPTION"].ToString();
i++;
}
}
}
return lista;
}
catch (Exception e)
{
Console.WriteLine("error: " + e.ToString());
return null;
}
Piyush Vardhan Singh
p_vardhan14@rediffmail.com
http://holyschoolofvaranasi.blogspot.com
http://holytravelsofvaranasi.blogspot.com
|
|
|
|
|
i am working with large video upload . for this i use splits the video into blocks(10 MB) and upload it using offset value. more over i have to show the progress
but i couldn't show the progress while the upload in progress. once the upload is over ,then status message appears.what is solution for this?
|
|
|
|