VS 2010 - Return From ModalPopupExtender To Call VB Code
Jul 20, 2013
I'm trying to do the equivalent of a "Are you sure you wish to delete?" and then if yes, return to a function in the aspx.vb code. Here is what I have:
Code:
<!-- ModalPopupExtender -->
<cc1:ModalPopupExtender ID="mp1" runat="server" PopupControlID="Panel1" TargetControlID="btnCancel"
CancelControlID="btnCancelNo" OkControlID="btnCancelYes" OnOkScript="__doPostBack" BackgroundCssClass="modalBackground">
[Code] ....
And then on the form, the btnCancel does popup the menu, with Yes / No and the text "Are you Sure?"But, even though I have a button called "btnCancelYes", I cannot get the code in there to trigger. Ie:
Code:
Protected Sub btnCancelYes_Click(sender As Object, e As EventArgs) Handles btnCancelYes.Click
DeleteRecord()
End Sub
View 3 Replies
Similar Messages:
Oct 8, 2010
XP Pro,aspnet 2, IIS, Oracle I have a primary webpage that displays a tab and some summary data. The tab uses an iframe and the summary data is loaded by an async WebMethod call back to C#. The iframe page takes a short while to load depending on how much data is in there (sometimes upto 20 seconds?). The WebMethod call, or at least the content of it, is very fast. BUT, the WebMethod call won't return until basically the iframe has finished loading.
I've verified through Fiddler that the browser is initiating both requests at basically the same time. It's initiating the iframe call first followed immediately by the WebMethod call within the same second. My understanding is that browsers are limited to only two calls at once.
If I set a breakpoint at the end of my WebMethod call (even commenting out ALL it's guts so it just returns an empty string), that breakpoint won't fire until the aspnet page serving up the iframe has finished. Using threads window, I see both calls at the server. I just don't understand why the server won't actually run the Webmethod call until the first call has finished. I've searched the code looking Monitor.Enter, lock, etc to make sure nobody has inserted any other type of blocking code and I can't find anything. I've basically emptied out the WebMethod call and it just returns a string, but no matter what I do, it just won't return as fast as it can. If I comment out the iframe, then the WebMethod call returns within 2 seconds. With the iframe, it "looks" like the the webmethod call won't return until the iframe has finished.
1) Does aspnet only process one request per aspnet session id? Is it FIFO? I figured the webserver would just process requests and return each request as fast as it can.
2) What else can I do to get that summary data to return faster (but not actually loading and putting the data into the very first primary page) ?
View 2 Replies
Feb 18, 2011
I am trying to add a ModalPopupExtender to a page I am using. But every time I try to add the ModalPopupExtender, it show an error on the bottom left of the IE page saying Object Not Supported.
I have put in the minimal amount of code required to use the modalpopupextender (i.e., just controlIDs) and it throws an error. If I comment it out, I get no errors on the page.
Stranger still, the Object not supported error states that it's at line 916, character 1, yet viewing the source only shows 343 lines of code? I have been trying to figure this out for a day now with no luck. I follow every tutorial I can find on the web for the modalpopupextender and everything is great until I put in the actual control.
View 1 Replies
Nov 17, 2010
I know this is a pretty common issue as i have read a lot of posts from people with similar issues. However thus far what i have uncovered doesn't seem to help resolve my issue. I have used the ModalPopupExtender regular enough but this is my first time needing the Dynamic side of things. The code I have is very basic and generic at the minute..I have the following ASPX code in place:
[Code]....
Now just to say at this stage the Modal Dialog box pops up and closes 100%. So my ProductPopulate.asmx service at the moment for testing is just using the VS2010 default Web Service with a few changes that i will explain.
[Code]....
So the changes i have made to the default VS2010 webservice is from this article http://sandblogaspnet.blogspot.com/2009/07/working-with-modal-popup-extender.html
I changed the default HelloWorld method to static and also uncommented the following line
[Code]....
So this is as far as my code has gotten at the minute. The Modal Dialog pops up 100% and what i would expect to see within the dialog box would be the text "Sampling Control" from the DynamicContextKey. Instead what i get is the "Web Service call failed: 500" error. I have stripped everything back to basics as you can see.. but for some reason i am still getting this error. I have used Web Services before from time to time without any issues and i have used the ModalPopupExtender without any issues.. but i am left scratching my head as to what i am missing on putting the two together.
Also just to note, both ASMX and ASPX files are currently in the root of the web project to rule out any path issues. Also i am using the VS Web Service to preview and debug.
View 5 Replies
Jan 11, 2010
In our application we have a scenario where we need to display a panel using modalpopupextender after performing an async call on the server. We were using the Show method for displaying the popup. It used to work fine without any async call. But when an async call was introduced during the request processing the popup is not getting displayed.
View 7 Replies
Dec 16, 2010
On one of my pages I've got a popup window implemented using the ModalPopupExtender. The content html of the popup is retrieved from a webservice dynamically (using DynamicServicePath, DynamicServiceMethod properties of the extender). Everything works fine, however there is a minor problem: web service call takes about 2 seconds and the popup panel is blank during this time, which confuses the users. I would like to display 'Loading...' message in the popup window (or an animated image, does not really matter) during the webservice call. Is there a way to do it?
View 2 Replies
Oct 6, 2010
I have two files. The first file is called FinalImage.aspx and here is the code for that page:
<html>
<body>
<img src="newpage.aspx" />
</body>
</html>
newpage.aspx has the following code, based on Jason's sample in the comments below:
<%@ Page Language="C#" %>
<script runat="server" language="c#">
protected void Page_Load(object sender, EventArgs e)
{
Response.ContentType = "image/png";
byte[] data = System.IO.File.ReadAllBytes("http://mystatus.skype.com/smallclassic/eric-greenberg");
Response.OutputStream.Write(data, 0, data.Length);
Response.OutputStream.Flush();
Response.End();
}
</script>
If I call FinalImage.aspx I see a broken image.
If I call newpage.aspx directly, I get a "URI Formats are not supported error"
I think its close, though. this solution is needed to get around the fact that skype does not have an https option for its skype buttons which tell the status of the skype user. Creating this proxy page will allow this to work without causing a 'mixed' security alert in the browser.
View 5 Replies
Nov 5, 2010
When I click on the following div:
<div id="Result">Click here for the time.</div>
I need the following codebehind function to run:
<WebMethod()> _
Public Shared Function GetDate() As String
Return DateTime.Now.ToString()
End Function
I need this to populate the inside of the div with the string returned by the GetDate() function. I think this should use code similar to this:
[Code]....
I've pulled this example from this site: [Code]....
However, I simply cannot get it to work. Nothing happens. This is just a regular asp.net web project. I haven't done any sort of Ajax-enabling business other than including script tags in my markup to reference jquery.
Here's what the firebug console tells me when I click on the div:
POST http://admin/Default.aspx GetDate 404 Not Found -18ms
Edit: Note: test.aspx/GetDate must match your aspx page name and function name!
View 1 Replies
Feb 13, 2010
An external server sends incoming SMS messages converted to HTTP requests into my sometimes very time-consuming .aspx page. If no response is returned to the external server in 20 seconds, this is considered as an timeout and the same message is sent to my aspx page again (and maybe again....The optimal solution for me would be that the aspx page reads the incoming message (as an HTTP request to the aspx page), starts the processing of the message in another thread, and immediately renders response back to the external server. The external server has no interest in other stuff than the HTTP status (normally 200). When the processing of the message is completed this results in an entry into the log file of the application.
View 2 Replies
Aug 31, 2010
I am trying to do a simple thing using asp.net. I wanna show a modal popup panel from a server procedure with vb.net.
The error is: The popup donīt show when I click cmdTest Button.
OBS: I used cmdTest just to call the procedure. In my project, one button call a procedure that will or not call other procedure that will or not show the panel.
whatīs wrong with the following code ?
-- aspx --
[Code]....
-- css --
[Code]....
-- vb --
[Code]....
View 3 Replies
Oct 27, 2010
It is possible to execute code behind in parent just after closing ModalPopupExtender ?
View 2 Replies
Jun 22, 2011
I have three XML files that are auto-generated and placed into my wwwroot directory. From there, I need to be able to search through these XML files looking for a record by either first name or last name. So, I have three xml files: a_results.xml, b_results.xml, and c_results.xml.
I'm having trouble reading / scanning these files so I really need some hand holding here. Very novice ASP/asp.net programmer here. Basically, I want a "search page" where the user will enter their search criteria into a text box (either first or last name) and the page will search the first and last name fields in all three of my xml files and return the results in a table, including the resulting first and last names plus their extension number.here is an example of one of the xml files
Code:
<response method="switchvox.extensions.search">
<result>
<extensions page_number="1" total_pages="1" items_per_page="500" total_items="3">
<extension number="1111" status="1" can_dial_from_ivr="1" account_id="1446" display="John Smith" date_created="2009-12-23 11:57:36" type="sip"
[code]....
So, as an example... I go to the page - enter "test" into the search box and click "find". The page should search all three xml files for the word "test" in the first OR last name fields and then return ALL of the combined results in a table which shows first name, last name, location and extension number (all available in the XML file(s) as shown above).
View 2 Replies
Feb 1, 2012
I am building a webservice that reads some HTML source code from a website and sends it back to the client. The service however is failing to send the data because it is too large. I keep getting this error:
The formatter threw an exception while trying to deserialize the message: There was an error while trying to deserialize parameter [URL]..... The InnerException message was 'There was an error deserializing the object of type iRacingForumServiceTest.ForumService.GetForumListResponseBody. The maximum string content length quota (8192) has been exceeded while reading XML data. This quota may be increased by changing the MaxStringContentLength property on the XmlDictionaryReaderQuotas object used when creating the XML reader. Line 153, position 247.'. Please see InnerException for more details.
I have been googling this problem for ages and I cannot figure out how to apply the answers I keep finding.
The problem is simple: the default configuration doesn't allow such large strings. I just don't know how to change this. All I keep finding is things related to WCF, I'm not sure if that applies for me.
What I keep finding is that I need to change the web.config file in various ways. However I cannot figure out where I need to put the config sections. I've tried everything but without a complete web.config file example I can't get it to work
Here is my current web.config of the server:
Code:
<?xml version="1.0"?>
<configuration>
<configSections>
</configSections>
<connectionStrings/>
<system.web>
[Code] ....
I found this piece to add to it:
Code:
<system.serviceModel>
<services>
<service name="ForumService">
<endpoint address=""
binding="basicHttpBinding"
[Code] ....
I figured out where to put it without getting errors (just as a child of the <configuration> element), but it just doesn't work. I get the same error no matter what values I try here... This shouldn't be such a difficult issue, how can I solve it?
View 8 Replies
Jan 11, 2012
So I've created a default Visual Studio project for a webservice and I invoked the HelloWorld method. What I get is indeed a "Hello World" string, but with some additional "crap" attached:
Code:
<style>
@namespace url(http://www.w3.org/1999/xhtml); [src="http://static.addtoany.com/buttons/share_save_256_24.png"] {display: none !important;} #a2apage_dropdown {display: none !important;} #socialBotAdd, .addthis_button, .addthis_toolbox.addthis_default_style, #addthis_link, [onclick="return addthis_sendto()"] {display: none !important;} #greet_block {display: none !important;} .meebo-00 {display: none !important;} #wibiyaToolbar, #wibiyaToolbar_window_template {display: none !important;}
</style>
Where is this stuff generated? And how can I remove this.
View 5 Replies
Feb 9, 2010
So I've got this method called LoginUser:
public void LoginUser(out SystemUser userToLogin, string username)
Having just started with Rhino Mocks, I'm having a little trouble mocking a call and return value from this method while testing my Presenter code. What's the correct syntax in this instance?
View 1 Replies
Mar 29, 2010
i'm a total newbie with asp.net mvc and here's my jam:
i have a 3 level list box which selection on box A shows options on box B and selection on box B will show the options for box C.
I'm trying to do the whole thing in asp.net MVC and what i see is that the nerd dinner tutorial uses the ORM method.
so i created a dbml to the database and drag the stored proc inside. i create a datacontext object but i don't quite know how to connect the result from the stored proce which should be multiple rows of data and make it into a json. so i can keep all the json data inside the html page and using jquery i could make the selection process faster. i don't expect the data inside the three boxes to change so often thus i think this method should be quite viable.
Questions:
So how do i get the stored proc part
to return the data as json?
i've noticed some tutorial online
that the json return result part is
at the controller and not at the
model end.
Why is that?
Edit
FYI, i find what i mostly wanted to do here.
For the json part, i referenced here.
View 1 Replies
Jun 19, 2010
Actually I am trying to learn jQuery Ajax calls to asp.Net webservices.
I have been trying to call the webmethod below:
[code]....
Do I need to serialize my object in some way before setting the 'data' attribute, so that I can call $.ajax() function?
View 2 Replies
Mar 18, 2011
I have a modalPopupExtender in my aspx web page pointing to a Panel and in Code-Behind I create buttons which I want them to show the modalPopup, so I have:
buttonX.OnClientClick = "javascript:$get(" + modalPopup.ClientID + ").show();";
but instead it just does a PostBack, even if I put "return false;" at the end of the past code.
View 3 Replies
May 1, 2010
In a button click, I need to be able to hide my ModalPanel and then continue running other code server-side. I currently have it this way:
[Code]....
It hides the panel at the of the event handler because that's when the page posts back. So what can I do to hide the panel and then continue running the rest of the server-side code?
Basically what I'm trying to do is the following:
1. Button_display in my webform simply displays my UpdatePanel via ModalPopupExtender.
2. Button_closePanel_Click will hide my UpdatePanel and then run some server-side code, which would display my UpdateProgress control.
protected void Button_closePanel_Click(object sender, EventArgs e)
View 2 Replies
Aug 4, 2010
I have the need to fire off a modal pop-up inline. I have a modal panel defined, and works when I click a test button on the page. Unfortunately I need it to work like this:
1.) A user clicks a 'Save' button
2.) In the code block for that button's Click event, there is a check for a certain constraint.
3.) If that constraint exists, I need to show the modal pop up and determine if the following code in the Click event is executed based off of the return of that modal pop up.
Easily accomplished using a Forms message box. But this is an ASP.net app. What I've tried so far is creating a button that uses a style with "display: none" and programmatically firing off that hidden button's click event. Unfortunately the code does execute but no modal pop up is displayed and the code continues to execute.
View 4 Replies
Dec 18, 2010
Had a datareader question.
[Code].......
Return myDataReader I have a function which is retuning a datareader to various sections of my website which is then being bound to dropdown lists, gridviews, etc. Normally the last line in a function when is the data reader and connection getting closed? Is it best practive to return a data reader or a dataset/datatable (or something even better than these two)?
View 8 Replies
Feb 13, 2014
I have a array list and am using like a database trying to search for ChildID and ParentID based on certain criteria.
My example below has the following keywords to search for:
Yellow, Mustard, Honey, Orange, Flame, Talisman
I also have a category volume value which I grab the first 2 characters to determine another filter.
My code isn't returning all matches with using 'Contains'. Right now it finds the 'Orange, Flame, Talisman'/AV record and returns 50, 28. My keywords also has 'Yellow, Mustard, Honey'/AV which should return 55 and 28 as well.
HTML Code:
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="temp2.aspx.vb" Inherits="temp2" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
[Code] ....
View 4 Replies
Mar 3, 2010
I want to call a function present in code behind from front page (html : source code)
i want to use like this:
Source code
<a href='<%# linkAlpha("B").ToString()) %>' title="B" id="B_List" runat = "server">B</a>
Code Behind
protected string linkAlpha(string value)
{
// /market-research/<%#Eval("customname")%>/
string str = "";
if (Request.Url.DnsSafeHost == "localhost")
{ // /market-reports/<%# Eval("customname")%>/
str = "Alpha_Category.aspx?q=" + value.ToString().Trim();
// Response.Redirect("Alpha_Category.aspx?q=" + value.ToString().Trim());
}
else
{
// str = "/market-reports/" + value.ToString().Trim() + "/";
str = "/Alpha_Category.aspx?q=" + value.ToString().Trim();
}
return str;
}
View 2 Replies
May 18, 2010
how do you call code behind button click event or a code behind method
from javascript.
View 8 Replies
May 25, 2010
I have an asp.net button, that when clicked calls a code behind function. The function does some evaluation, and then I want to call javascript from within this asp.net function.
View 2 Replies