mathieu_cupryk
asked on
Ajax want to show save message on screen saving new ticket id....
I want to display in ajax asp.net a save message saying saving new ticket id..
where are you getting your ID from? on the same page or a different page? Ajax should only be used to pull data across pages without causing a refresh.... so if you already have the new ID on the same page... just JavaScript it...
ASKER
from the code behind.
<asp:Panel ID="Panel1" runat="server" CssClass="modalPopup" Style="display: none" Width="233px">
<p>Are you sure you want to Continue</p>
<br />
<div align="center">
<asp:Button ID="OkButton" runat="server" Text="OK" />
<asp:Button ID="CancelButton" runat="server" Text="Cancel" />
</div>
</asp:Panel>
<ajaxToolkit:ModalPopupExt ender ID="popup" runat="server"
TargetControlID="LinkButto n1"
PopupControlID="Panel1"
BackgroundCssClass="modalB ackground"
DropShadow="true"
OkControlID="OkButton"
OnOkScript="onOk()"
CancelControlID="CancelBut ton" />
Need to setup server control
<asp:Panel ID="Panel1" runat="server" CssClass="modalPopup" Style="display: none" Width="233px">
<p>Are you sure you want to Continue</p>
<br />
<div align="center">
<asp:Button ID="OkButton" runat="server" Text="OK" />
<asp:Button ID="CancelButton" runat="server" Text="Cancel" />
</div>
</asp:Panel>
<ajaxToolkit:ModalPopupExt
TargetControlID="LinkButto
PopupControlID="Panel1"
BackgroundCssClass="modalB
DropShadow="true"
OkControlID="OkButton"
OnOkScript="onOk()"
CancelControlID="CancelBut
Need to setup server control
all this tells me is that you want to run a script called @onOk@ when the user clicks the Ok button of the confirmation message... where are you saving the ticket when they click ok? where do you want the user to be brought to once they see the ticket id? this is only the control to be used, not where/how you're getting the information... on the same page or not? back to my original question ;-)
ASKER
I need to execute this and get the ticketid
and then display it.
protected void btnSaveExit_Click(object sender, EventArgs e)
{
if (Page.IsValid)
{
// Instantiate bussiness object
Ticket ticket = new Ticket();
ticket.TicketType = uxLookupFieldTicketType1.S electedTex t;
ticket.TicketStatus = uxLookupFieldTicketStatus1 .SelectedT ext;
ticket.Priority = uxLookupFieldTicketPriorit y1.Selecte dText;
ticket.ServiceImpact = uxLookupFieldTicketService Impact1.Se lectedText ;
ticket.RequestType = uxLookupFieldTicketRequest Type1.Sele ctedText;
ticket.AgentCreated = uxLookupFieldTicketAssigne dTo.Select edText;
ticket.ContactMethod = uxLookupFieldTicketContact Method1.Se lectedText ;
ticket.LocationSIMs = uxLookupFieldTicketLocatio nSIMs1.Sel ectedText;
ticket.AgentFollowup = uxLookupFieldTicketAgentFo lowup1.Sel ectedText;
ticket.ShortDescription = txtShortDescription.Text;
ticket.ExternalTicket = txtExternalTicket.Text;
ticket.TrackIt = txtTrackIt.Text;
ticket.SolutionNote = txtSolution.Text;
ticket.ProblemNote = txtProblem.Text;
ticket.FollowupNote = txtFollowupNotes.Text;
ticket.ActionNote = txtActionTaken.Text;
ticket.TicketApplicationTy pe = txtSubmitVia.Text;
ticket.DateTimeAssigned = this.ParseDateTime(this.tx tDateAssig ned.Text);
ticket.DateCreated = this.ParseDateTime(this.lb lDateCreat ed.Text);
ticket.DateClosed = this.ParseDateTime(this.lb lDateClose d.Text);
ticket.DateLastModified = this.ParseDateTime(this.lb lLastUpdat e.Text);
ticket.AgentClosed = this.lblClosedBy.Text;
ItemCreatedResult res = new ItemCreatedResult();
res = BLL.TicketLogic.InsertTick et(ticket) ;
if (res.Code == 1)
// throw exception
{
}
else
{
Response.Redirect("Company Tickets.as px");
}
}
}
and then display it.
protected void btnSaveExit_Click(object sender, EventArgs e)
{
if (Page.IsValid)
{
// Instantiate bussiness object
Ticket ticket = new Ticket();
ticket.TicketType = uxLookupFieldTicketType1.S
ticket.TicketStatus = uxLookupFieldTicketStatus1
ticket.Priority = uxLookupFieldTicketPriorit
ticket.ServiceImpact = uxLookupFieldTicketService
ticket.RequestType = uxLookupFieldTicketRequest
ticket.AgentCreated = uxLookupFieldTicketAssigne
ticket.ContactMethod = uxLookupFieldTicketContact
ticket.LocationSIMs = uxLookupFieldTicketLocatio
ticket.AgentFollowup = uxLookupFieldTicketAgentFo
ticket.ShortDescription = txtShortDescription.Text;
ticket.ExternalTicket = txtExternalTicket.Text;
ticket.TrackIt = txtTrackIt.Text;
ticket.SolutionNote = txtSolution.Text;
ticket.ProblemNote = txtProblem.Text;
ticket.FollowupNote = txtFollowupNotes.Text;
ticket.ActionNote = txtActionTaken.Text;
ticket.TicketApplicationTy
ticket.DateTimeAssigned = this.ParseDateTime(this.tx
ticket.DateCreated = this.ParseDateTime(this.lb
ticket.DateClosed = this.ParseDateTime(this.lb
ticket.DateLastModified = this.ParseDateTime(this.lb
ticket.AgentClosed = this.lblClosedBy.Text;
ItemCreatedResult res = new ItemCreatedResult();
res = BLL.TicketLogic.InsertTick
if (res.Code == 1)
// throw exception
{
}
else
{
Response.Redirect("Company
}
}
}
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.