|
Is it possible to add a cancel button inside a wizard control? Even though I googled it, I didn't receive anything usefully. Can anybody provide any links or articles to this?
Success is the good fortune that comes from aspiration, desperation, perspiration and inspiration.
|
|
|
|
|
Set the DisplayCancelButton property to true.
|
|
|
|
|
I tried that. But still not displaying that button. Following is my html code:
<asp:Wizard ID="CreateDocumentWizard" runat="server" ActiveStepIndex="0" BorderWidth="0px"
DisplaySideBar="False" OnPreviousButtonClick = "CreateDocumentWizard_PreviousButtonClick"
onnextbuttonclick="CreateDocumentWizard_NextButtonClick"
onfinishbuttonclick="CreateDocumentWizard_FinishButtonClick"
onactivestepchanged="CreateDocumentWizard_ActiveStepChanged" DisplayCancelButton="true" >
Am I do something wrong here? Or should I do something else? Please help.
Success is the good fortune that comes from aspiration, desperation, perspiration and inspiration.
|
|
|
|
|
Have you added WizardSteps to your wizard control.
The Cancel button is displayed for me.
|
|
|
|
|
|
Is this reply for me or the person who posted the question?
|
|
|
|
|
Thanks a lot for your help in the first instance.
I think I got it.
I have added Wizard steps to the control. and also added start and step navigation template as follows:
<StartNavigationTemplate>
<asp:Button ID = "StartNextButton" runat="server" CommandName="MoveNext" Text="Next" />
</StartNavigationTemplate>
<StepNavigationTemplate>
<asp:Button ID="StepPreviousButton" runat="server" CausesValidation="False"
CommandName="MovePrevious" Text="Previous"
/>
<asp:Button ID="StepNextButton" runat="server" CommandName="MoveNext"
Text="Next" />
<asp:Button ID="CancelButton" runat="server" CommandName="Cancel" Text="Cancel" />
</StepNavigationTemplate>
I think if I put cancel button again in start navigation template, then it will also appear in first tab. But I feel the code is repeating. Is this the correct way to display the cancel button? Please suggest.
Thanks again!!
Success is the good fortune that comes from aspiration, desperation, perspiration and inspiration.
|
|
|
|
|
Good Day
Am using IE 7 and Infragistics 8.1. Things have been working well until i played around with the IE Manage Pluggins. Now everything has freezed. i cant use menus in my IE. On other Machines my Application works fine. I have uninstalled IE7 and installed another one again but still the Problem persist.
Thank you
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.somee.com
http://www.vuyiswamaseko.tiyaneProperties.co.za
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
I've got an IIS v6 (Windows Server 2003) web site which uses an old DLL written with unmanaged code. (Aspx, C# using System.Runtime.InteropService to call unmanaged dll)
But I've bought a new Windows Server 2008 with IIS7 and the call to unmanaged DLL is not working.
In fact my C# code call an unmanaged DLL but the code never ends. It's entering in DLL code (all is working until the "return"; instruction, but it does not return to C# !!).
I've tried to configure the application pool (classic mode), the web site properties... but to hard for me.At a time I got the error "IIS Worker Thread stop working"!
A sample:
ASPX
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Table runat="server">
<asp:TableRow>
<asp:TableCell>
<asp:Button ID="Button1" runat="server" Text="Button" onclick="Button1_Click" />
</asp:TableCell>
</asp:TableRow>
<asp:TableRow>
<asp:TableCell>
<asp:Literal ID="Literal1" runat="server"></asp:Literal>
</asp:TableCell>
</asp:TableRow>
</asp:Table>
</div>
</form>
</body>
</html>
CS
using System;
using System.Runtime.InteropServices;
public partial class _Default : System.Web.UI.Page
{
[DllImport("MyDLL.dll", EntryPoint = "?get_html@@YAPBDN@Z")]
static extern string get_html(double value);
protected void Button1_Click(object sender, EventArgs e)
{
Random a = new Random();
Literal1.Text = get_html(a.NextDouble());
}
}
DLL C++
#include "stdafx.h"
#include "stdio.h"
char myBuffer[MAX_PATH];
__declspec(dllexport) const char * get_html(double value)
{
memset(myBuffer, 0x00, MAX_PATH);
sprintf(myBuffer, "<html><title>Test</title></head><body>Entered value : %.2f<br>Value x2 = %.2f</body></html>", value, value*2);
return myBuffer;
}
With IIS6, when the button is clicked the HTML text is displayed (all is good). With IIS7 nothing is happening !
Any idea ?
Thanks for help !
Le Sourcier
|
|
|
|
|
Did you get this issue resolved?
I'm having a similar issue and haven't found anything online yet to resolve it.
|
|
|
|
|
Hi There,
I have redio button list.What I want to do is that I want to check which radio button selected using JavaScript.Can anybody tell me how to do this.
Thanks.
Life Is Beautifull
|
|
|
|
|
function GetRadioButtonValue(radioButtonListName)
{
var radio = document.getElementsByName(radioButtonListName);
for (var i = 0; i < radio.length; i++)
{
if (radio[i].checked)
alert(radio[i].value);
}
}
|
|
|
|
|
Hello All,
I have a question,suppose I want to add a web service reference which is developed in asp.net into another plateform e.g.PHP,Java etc... And my web service return dataset or datareader or anything else.
So what the excetly result I'll get.. Is it a XML return ?? or some error found when I add that web service reference.
So if you have any good online tutorial for the web service as advance evel then let me give also.....
Thanks in advance...
Deepak
Smile a Lots,Its Costs Nothing
|
|
|
|
|
Web services communicates using SOAP messages. So you will get XML format string which matches to SOAP specification[^]. When you add web service through visual studio, it generates a proxy class which take care about converting the raw SOAP message into appropriate data structures (DataSet in your case).
A web service is stateless and it can't return a data reader.
|
|
|
|
|
thanks a lot...
Deepak
Smile a Lots,Its Costs Nothing
|
|
|
|
|
Hello All,
i have list box which have display only 10 item at a time and when user scroll down i have fire one click event through java script and fill next 10 record in list box.
but i have one problem when click event is fire i want to set scroll position at 11 record.
can you please help how it's possible?
Thanks in advance.
Anish Patel
|
|
|
|
|
hi plz help
when i click a delete link in gridview it show error after refreshing it it delete the row "Deleting is not supported by data source 'SqlDataSource1' unless DeleteCommand is specified."
where my code in asp.net and C# is like that
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"
DataKeyNames="RecordID" DataSourceID="SqlDataSource1"
style="top: 272px; left: 269px; position: absolute; height: 133px; width: 527px; z-index: 1"
onrowdeleting="Delete">
<Columns>
<asp:BoundField DataField="RecordID" HeaderText="RecordID"
InsertVisible="False" ReadOnly="True" SortExpression="RecordID" />
<asp:BoundField DataField="CouponTypeID" HeaderText="CouponType"
SortExpression="CouponTypeID" />
<asp:BoundField DataField="TransactionDate" HeaderText="Date"
SortExpression="TransactionDate" />
<asp:BoundField DataField="TransactionTypeID" HeaderText="TransactionType"
SortExpression="TransactionTypeID" />
<asp:BoundField DataField="Description" HeaderText="Description"
SortExpression="Description" />
<asp:BoundField DataField="CafeMenu" HeaderText="Menu"
SortExpression="CafeMenu" />
<asp:BoundField DataField="SerialStart" HeaderText="Start"
SortExpression="SerialStart" />
<asp:BoundField DataField="SerialEnd" HeaderText="End"
SortExpression="SerialEnd" />
<asp:BoundField DataField="Price" HeaderText="Price" SortExpression="Price" />
<asp:TemplateField HeaderText="Delete">
<ItemTemplate>
<span onclick="return confirm('Are you sure to Delete the record?')">
<asp:LinkButton runat="server" ID="lnkDelete" CommandName="Delete" Text="Delete" >
</asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
<asp:Label ID="ErrorMessage" runat="server"
style="position:absolute; top: 645px; left: 282px; width: 682px; color: #FF9933; font-style: italic;"
Font-Bold="True" ForeColor="#003E3E"></asp:Label>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:Coupon ManagementConnectionString10 %>"
SelectCommand="SELECT [RecordID], [CouponTypeID], [TransactionDate], [TransactionTypeID], [Description], [CafeMenu], [SerialStart], [SerialEnd], [Price] FROM [CouponTransaction]">
</asp:SqlDataSource>
</asp:Content>
and C# code is
protected void Delete(object sender, GridViewDeleteEventArgs e)
{
try
{
cnx.Open();
SqlCommand mySqlDelete = new SqlCommand("delete from CouponTransaction where RecordID = @recordId", cnx);
mySqlDelete.CommandType = CommandType.Text;
mySqlDelete.Parameters.Add("@recordId", SqlDbType.Int).Value = Convert.ToInt32(GridView1.DataKeys[e.RowIndex].Values[0].ToString());
mySqlDelete.ExecuteNonQuery();
ErrorMessage.Text = " Row Deleted Successfully";
cnx.Close();
}
catch (Exception ex)
{
ErrorMessage.Text = ex.Message;
}
}
|
|
|
|
|
haleemasher wrote: "Deleting is not supported by data source 'SqlDataSource1' unless DeleteCommand is specified."
Its means, you are trying to delete records, without specifying the Delete Command with your SQL DataSouce. Please Provide the DeleteCommand and Try it again !
|
|
|
|
|
i have done it plz chk my code
|
|
|
|
|
No, you need to define it on the SqlDataSource. Look at your original post - you supply a SelectCommand but no DeleteCommand.
|
|
|
|
|
Solution:
U should make a bit changes at:
<asp:LinkButton runat="server" ID="lnkDelete" CommandName="Delete" Text="Delete" > </asp:LinkButton>
*1st: don't use default CommandName="delete" , i choosed CommandName="xoa"
*2nd: use RowCommand event instead of Delete event
eg:
protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
{
try
{
switch (e.CommandName)
{
case "xoa":
(new Report()).DeleteBy(e.CommandArgument.ToString());
RefreshList();
break;
case "sua":
//Report _rpt = Report.GetReportById(e.CommandArgument.ToString());
break;
}
}
catch (System.Exception ex)
{
ShowWarningMessage(ex.Message);
}
}
-------END----
|
|
|
|
|
Hi All,
I have created a menu by writing html in C# code. I have used
|
|
|
|
|
i created a checkbox dynamicaly, and added it to the web form ,it id displayed in the form ,but when the state is changed the event is not fired.
public class checkbox:CheckBox
{
CheckBox chkbx;
public checkbox()
{
chkbx = new CheckBox();
chkbx.ID = "chk1";
chkbx.Attributes["runat"] = "server";
chkbx.AutoPostBack = true;
chkbx.CheckedChanged += new EventHandler(myclick);
Controls.Add(chkbx);
}
public void myclick(object sender, EventArgs e)
{
{
if (chkbx.Checked)
{
chkbx.Text = "checked";
}
}
}
}
this is on the form
protected void Page_Load(object sender, EventArgs e)
{
checkbox cbx = new checkbox();
form1.Controls.Add(cbx);
}
any one got any idea why this is not functioning well ?
|
|
|
|
|
You need to read more about view states and ASP.NET page life cycle. ASP.NET will not maintain view state for controls which are created inside page_load . Try some event which occurs before view state is saved. Init is one option.
|
|
|
|
|
How can i detect bluetooth device and transfer the data from Pocket PC in C#
|
|
|
|