6
Answers

Asp.net server migration from 2003 to 2008 configuration fil

Anup

Anup

9y
644
1

I have a windows application program, exe for this application is executed remotely by some other system. Now there are server upgrade activity carried out and application is moved to new server 2008 from 2003

There is no change in configuration section made by me.

Here is how the config file looks like

<?xml version="1.0" encoding="utf-8" ?> <configuration>     <configSections>     <section name="somesettings" type="Someapplication.Infrastructure.somesettings" requirePermission="false" /> </configSections>  <somesettings setting1="Value1" setting2="value two"                    setting3="third value" /> </configuration>

Now the issue is, post migration from 2003 ( 32 bit ) to 2008 ( 64 bit ) the windows application could not read the custom configuration defined at configSections section.

Not able to find settings required post migration which will enable the program to read config sections settings.

Any help will be appreciated !

Answers (6)
2
Ankit  Shukla

Ankit Shukla

NA 503 24.8k 9y
Hi, 
 
 Please write this code on source code:
 
 
<asp:Button ID="Delete" runat="server" onclick="Delete_Click"
OnClientClick="javascript: return confirm('Are you sure want to Delete?')"
Text="Delete" />
 
1
Govinda Rajulu Yemineni

Govinda Rajulu Yemineni

NA 1.5k 233.1k 9y
Hi,
 
generate OnRowDataBound event for Gridview and write the following code
 
protected void OnRowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
string item = e.Row.Cells[0].Text;
foreach (Button button in e.Row.Cells[2].Controls.OfType<Button>())
{
if (button.CommandName == "Delete")
{
button.Attributes["onclick"] = "if(!confirm('Do you want to delete " + item + "?')){ return false; };";
}
}
}
}
 
for more information please refer the following URL
 
 http://www.aspsnippets.com/Articles/Delete-ASPNet-GridView-Row-with-JavaScript-Confirmation-Box-using-CommandField-and-OnRowDeleting-event.aspx
 
 If you find anything helpful please accept my answer
1
Manas Mohapatra

Manas Mohapatra

NA 29.3k 3.3m 9y
1
Rajeesh Menoth

Rajeesh Menoth

NA 24.7k 628.9k 9y
1
Upendra Pratap Shahi

Upendra Pratap Shahi

NA 13.3k 861.3k 9y
Use below function-
 

function deleteArticle(hdnPostId, divContainer) {

if (confirm("Are you sure?"))

{

$.ajax({

type: "POST",

url: "TestPage.aspx/DeleteArticle",

data: "{PostId: '" + hdnPostId + "'}",

contentType: "application/json; charset=utf-8",

dataType: "json",

success: function (data) {

$('#' + divContainer).hide();

},

failure: function (errMsg) {

alert(errMsg);

}

});

}

return false;

}

 
in code behind call like this-
 

hypDelete.Attributes.Add("onclick","javascript:deleteArticle('"+hdnPostId.Value+"','"+divContainer.ClientID+"');return false;");

 
1
Govinda Rajulu Yemineni

Govinda Rajulu Yemineni

NA 1.5k 233.1k 9y
Hi,
 
define one button like this
 
<asp:LinkButton ID="lbDelete" runat="server" OnClick="lbDelete_Click" OnClientClick="return fnConfirm();"> Delete</asp:LinkButton> 
 
write javascript function for button like
 
<script type="text/javascript">
function fnConfirm() {
if (confirm("The item will be deleted. Are you sure want to continue?") == true)
return true;
else
return false;
}
 
in lbDelete_Click event write the logic for deletion of item 
 
for more information please refer the following link
 
http://www.dotnetpickles.com/2013/03/how-to-show-confirm-message-while.html 
 
If you find anything helpful please accept my answer 
 
1
Nilesh Jadav

Nilesh Jadav

7 23.8k 5.7m 9y
1
Manas Mohapatra

Manas Mohapatra

NA 29.3k 3.3m 9y
Hi Murugavel,
 
Please find below code:  
 
<!DOCTYPE html>
<html>
   <body>
      <p>Click the button to display a confirm box.</p>
 
      <asp:Button ID="btnDelete" onclientclick="return myFunction()"          OnClick="CallServerMethod()"
      <p id="demo"></p>
 
      <script>
         function myFunction() {
            var result = confirm("Press a button!");
            if (result == true) {
               return true;
            } else {
               return false;
            }
         }
      </script>
   </body>
</html>
0
Murugavel S

Murugavel S

NA 81 7.7k 9y
Hello All,
 
         Thanks  a lot for ur Replies.. 
          Im sorry , in form I used <asp:commandfield> for delete .
         in that there is no property called  onclientclick and OnClick.
       so, how to display confirm msg before deleting item.?
      im using <asp:commandfield> for delete..
        Thanks in Advance