|
here my prob is ,
for example i have a savebutton
and when that button clicked am do both insert and update,
if yes how to do that.using any flag variable or something like that,urgent.
kissy
|
|
|
|
|
Insert and update what? A file, a listbox, database???
only two letters away from being an asset
|
|
|
|
|
And even if both are there they can be done one after one.
Best Regards,
Apurva Kaushal
|
|
|
|
|
Hi,
I hope my understanding is correct.
You have button to save the data to the backend, that needs to insert the new record and update the existing reocrd is it? You can have a viewstate variable in your web form to check the corrent record on the web form is in insert mode or update mode (If a record retrieved from backend it is in update mode), set the status as 'U' in the view state, if the viewstate value is 'U' issue an update or make an insert. Hope this what you want?
Ram
|
|
|
|
|
how it will works,i can not get the idea.I have add,update,save buttons.if i add button just i am able to edit a name in the textbox,then i click save.same way if i click on update ,i can just modify the value and again i need to click on save button to save the changes.
will it be possible to do these two tasks in save button(insert,update).how??
kissy
|
|
|
|
|
Put the code of insert in a separate function and update in a separate function and then call both the metods one after one where you want to accomplish both the task.
Best Regards,
Apurva Kaushal
|
|
|
|
|
thank you ur answer is good,i am trying in that way.
kissy
|
|
|
|
|
always welcome..
Best Regards,
Apurva Kaushal
|
|
|
|
|
I have the solution if two buttons are there differently,but is it possible in a same button.if i click add then save,if i click update then save.add and update code can we write in the same button,if how
kissy
|
|
|
|
|
Hi,
I have got a button inside a page which is which is derived from a Master Page.Button Click of this button pops up a child calendar window i need to collect the selected date back in a textbox availabale on the parent form, but i am unable to get the desired results. Please let me know what all modification i do need to make in the following code to get the desired results:
Code in the button Click Event:--
string id = txtSDate.ClientID;
string str = " window.open(" + "'../Components/calendar.aspx?formname=frmGlobalScheme." + id.ToString() + "','Details','height=260,width=300,resizable=No,scrollbars=Yes,menubar=No')";
Response.Write(str);
Code in Calendar SelectionChanged Event:--
string strjscript = "";
strjscript += "window.opener." + HttpContext.Current.Request.QueryString["formname"];
strjscript += ".value = '" + Calendar1.SelectedDate.ToString("d") + "';window.close();";
strjscript += "</script" + ">";
Response.Write(strjscript );
Thanks in Advance
|
|
|
|
|
Yes same problem i am facing.
any help please
Naveed Kamboh
|
|
|
|
|
I have a calendar popup that I use as well. Here is the code behind.
<br />
<br />
public partial class UserControls_CalendarPopUp : System.Web.UI.Page<br />
{<br />
protected void Page_Load(object sender, EventArgs e)<br />
{<br />
if (Request.QueryString["DefaultDate"] != "")<br />
{<br />
this.Cal.SelectedDate = DateTime.Parse(Request.QueryString["DefaultDate"].ToString());<br />
}<br />
}<br />
protected void Cal_SelectionChanged(object sender, EventArgs e)<br />
{<br />
string StrTB;<br />
string StrJs;<br />
<br />
StrTB = Request.QueryString["TB"].ToString();<br />
StrJs = "<script> opener.window.document.getElementById('" + StrTB + "').value = '" + this.Cal.SelectedDate.ToShortDateString() + "' ; window.close(); </script>";<br />
this.ClientScript.RegisterClientScriptBlock(this.Page.GetType(), @"<script type=""text/javascript"">UpdateOpener();</script>", StrJs);<br />
}<br />
}<br />
<br />
<br />
protected void Page_Load(object sender, EventArgs e)<br />
{<br />
if (!IsPostBack)<br />
{<br />
this.imgCalIcon.Style.Add("Cursor", "pointer");<br />
this.imgCalIcon.Attributes.Add("onclick", @"popupCal('" + this.TxtDate.ClientID.ToString() + @"', '" + sDefaultDate+@"');");<br />
}<br />
<br />
}<br />
<br />
<br />
<br />
Finall the javascript on the page with the image<br />
<br />
function popupCal(TextBox, DefaultDate)<br />
{<br />
settings=<br />
"toolbar=no,location=no,directories=no,"+<br />
"status=no,menubar=no,scrollbars=no,"+<br />
"resizable=no,width=230,height=186;"<br />
MyNewWindow= open("../UserControls/DateTextBox/PopUpCalendar/CalendarPopUp.aspx?TB="+TextBox+"&DefaultDate="+DefaultDate,"CalFrom",settings);<br />
}<br />
<br />
One more thing don't forget to change the link to the CalendarPopUp.aspx. It will have to point to the directory where you put the calendar page.
how vital enterprise application are for proactive organizations leveraging collective synergy to think outside the box and formulate their key objectives into a win-win game plan with a quality-driven approach that focuses on empowering key players to drive-up their core competencies and increase expectations with an all-around initiative to drive up the bottom-line. But of course, that's all a "high level" overview of things
--thedailywtf 3/21/06
|
|
|
|
|
|
Hi All,
Is Microsoft Obseleting the VB 6 support ??
Plz discuss, or give Valid links about this Topic.
Thanks in advance
Sajjad
|
|
|
|
|
|
thanx Mike
|
|
|
|
|
Here i have a dropdwnlist and when i do some changes with the list in dropdwnlist,that should be reflected in dropdownlist,for me it si reflecting in database only.
when i clickon refresh buttom from the main menu it should be reflected in the listitems also.give me a solution
kissy
|
|
|
|
|
Sounds like you need to rebind your list after you change the items.
|
|
|
|
|
ya i need to get the same.how to do this in update button event raised
kissy
|
|
|
|
|
When you update the database with the new value just after that rebind the dropdownlist.
Best Regards,
Apurva Kaushal
|
|
|
|
|
myListBox.DataSource = myNewlyUpdatedDataSource
myListBox.DataBind()
|
|
|
|
|
Hi, good day.
I face a problem when i need to update the edited data in datagrid.
An server error occur when i click "update" button in datagrid.The error like below:
< Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.FormatException: Input string was not in a correct format.
Source Error:
Line 670: UnitPrice = CType(objItem.Cells(4).Text, Double).ToString >
For the "UnitPrice" is the edited column in datagrid. Can anyone explain why this error happen? Thank.
Best Regards,
Pei Sun
|
|
|
|
|
Debug into this, make sure that objItem.Cells(4).Text is the right cell. The runtime is having problem converting whatever is in this cell to a double...
|
|
|
|
|
Hi,
I want to designing a project based on Neural Networks.
Can anyone please help me in finding out an article or site which can be a guide to me for learning and implementing neural networks?
Also can anyone help me picking up a good project for the same?
[that's,am designing the project for my sake only.So i need a suitable subject for implementing the concept..like,we can use it for finding flaws in a picture...or any other subjects...)
Thanks....
|
|
|
|
|