CodeVerge.Net Beta


   Explore    Item Entry   Register  Login  
web_forms
getting_started
data_presentation_controls
dotnetnuke
data_access-sql_server_sql_server_express_and_sqldatasource_control
security
client_side_web_development
novell-support-groupwise-6x-clients
data_access-data_access_and_objectdatasource_control
asp-net_ajax-asp-net_ajax_control_toolkit
novell-support-netware-6x-install-upgrade
asp-net_ajax-asp-net_ajax_discussion_and_suggestions
novell-support-netware-6x-administration-tools
master_pages_themes_and_navigation_controls
configuration_and_deployment
novell-support-netware-client-winnt-2x-xp
novell-support-groupwise-7x-clients
asp-net_ajax-asp-net_ajax_ui
novell-support-edirectory-netware
community-free_for_all
visual_studio_2005
novell-support-groupwise-6x-install-setup
data_access-xml_and_xmldatasource_control
control-cancel
novell-support-iprint
advanced_asp-net-crystal_reports
data_access-xml_web_services
microsoft-public-access
novell-community-chat
state_management
novell-support-netware-6x-abends-hangs
dotnetnuke-getting_started
novell-support-groupwise-6x-gwia
-net_languages-c
novell-support-identity-manager-engine-drivers
novell-support-groupwise-discontinued
advanced_asp-net-architecture
opensuse-org-suse-linux-support-install-configure-administration
dotnetnuke-custom_modules
novell-support-groupwise-7x-install-setup-admin
novell-support-netware-6x-storage-media
novell-support-groupwise-6x-agents
installation_and_setup
data_access-access_databases_and_accessdatasource_control
windows-hosting_open_forum
visual_web_developer_2005_express
novell-support-groupwise-6x-web-access
novell-support-netware-6x-server-backup
macromedia-dreamweaver
novell-support-netware-5x-administration-tools
novell-support-ifolder
novell-support-bordermanager-install-setup
novell-support-imanager
microsoft-public-dotnet-framework-aspnet
novell-support-netware-5x-install-upgrade
novell-support-cluster-services
novell-support-bordermanager-proxies
novell-support-newsflash
advanced_asp-net-sql_server_reporting_services
microsoft-public-dotnet-languages-csharp
web_parts_and_personalization
about_this_site-feedback_on_this_website
ibm-software-websphere-portal-server
novell-support-netware-dns-dhcp
novell-support-zenworks-desktops-4x-app-launcher
-net_languages-visual_basic_-net
advanced_asp-net-custom_server_controls
novell-support-bordermanager-vpn
novell-support-ndps-neps
microsoft-public-sqlserver-programming
novell-support-netware-webserver
community-jobs
novell-support-netware-4x
advanced_asp-net-mobile_and_handheld_devices
internet_explorer_web_controls
novell-support-zenworks-desktops-4x-install-setup
novell-support-edirectory-linux
novell-support-groupwise-7x-gwia
development_tools-web_matrix_general_discussions
microsoft-public-access-formscoding
macromedia-flash
community-announcements
portal_starter_kit
novell-support-zenworks-desktops-4x-management-agent
novell-support-zenworks-patch-management
novell-support-native-file-access
microsoft-public-access-queries
microsoft-public-access-forms
novell-support-groupwise-7x-web-access
novell-support-netware-small-business-6x
data_access-active_directory_and_ldap
novell-support-edirectory-windows
novell-support-groupwise-7x-agents
novell-support-ichain
data_access-oracle
novell-support-zenworks-desktop-management-6x-imaging
novell-support-groupwise-7x-wireless
novell-support-netware-5x-abends-hangs
advanced_asp-net-localization
novell-support-zenworks-desktop-management-7x-imaging-server-nw-win




Can Reply:  No Members Can Edit: No Online: Yes
Zone: > Asp.Net Forum > visual_studio.vs_2005_web_application_projects Tags:
Item Type: Date Entered: 8/29/2007 1:56:35 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
NR
XPoints: N/A Replies: 1 Views: 29 Favorited: 0 Favorite
2 Items, 1 Pages 1 |< << Go >> >|
"benzee" <>
NewsGroup User
Message box8/29/2007 1:56:35 PM

0

Hi:

I have a little bit of issue displaying message boxes. Sometimes the message box shows up on the same page that I am on (this is what I wnat) and sometimes it shows up on a blank page (this is not what I want). I just like to make sure that my Msg Box pops up on the same page that I am working on. Here is my class and how I call my class:

Imports Microsoft.VisualBasic

Imports System.Windows.Forms

Public Class PublicMessageBox

Inherits System.Web.UI.Page

Public Sub UserMsgBox(ByVal sMsg As String, ByRef inputPage As System.Web.UI.Page)

Dim sb As New StringBuilder()Dim oFormObject As System.Web.UI.Control

sMsg = sMsg.Replace("'", "\'")

sMsg = sMsg.Replace(Chr(34), "\" & Chr(34))

sMsg = sMsg.Replace(vbCrLf, "\n")

sMsg = "<script language=javascript>alert(""" & sMsg & """)</script>"

sb = New StringBuilder()

sb.Append(sMsg)

For Each oFormObject In inputPage.Controls

If TypeOf oFormObject Is HtmlForm Then

' Add the javascript after the form object so that the ' message doesn't appear on a blank screen.End Sub

oFormObject.Controls.AddAt(oFormObject.Controls.Count, New LiteralControl(sb.ToString()))

Exit For

End If

Next

End Sub

 

  1. Here how I use my class:

Dim clsMsg As PublicMessageBox = New PublicMessageBox

clsMsg.UserMsgBox("There is no data available.", Me)

"satishpk" <>
NewsGroup User
Re: Message box8/29/2007 7:16:14 PM

0

Use Page.RegisterStartupScript function (or ClientScript.RegisterStartupScript in ASP.NET 2.0) to emit the alert javascript instead of LiteralControl. This will ensure script execution at the end of loading.


Remember to click on Mark as answer on the post that helped you
2 Items, 1 Pages 1 |< << Go >> >|


Free Download:













site log in 3.0.13

problems installing dnn 3.1 with sql 2005 june ctp

why do i loose my default country during registration? - 1.0.10d

issues with dnn 3.1 and windows auth

dnn and netscape 4.7

campaign donations - best practice?

dotnetnuke consultants

printermodule

acces to path "...dotnetnuke\verify" is denied.

how do you install the solpart menu ???

has anyone addressed dnn scalability?

file security in dnn 3.2

client side popup that posts back

3.0.12 installing custom modules doesn't work plan b

how do you make your labelusercontrol blue verdana text?

link styles based on pane?

portal alias direct editing

coppa

skinning - how can i customize the [signin] token?

instead of "alltabs" how about a "all sub tabs"

suggestion for the pagingcontrol within dnn311(possible bug?)

module globalization: how we globalized magicchat.

use of anonymoususers table

error: page management is currently unavailable.

help!!!

how do you wrap text in solpartmenu?

bug ? can't use file manager in dnn 3.1.13

need help with member registration configuration troubleshooting for dnn 2.04

my survey module just died?

need help with solpartmenu

access business objects through webservice

web farm

missing some procedures in database while installation

feedback module

custom sqldataprovider keeps causing underconstruction.htm - please help.

no new posts?

2.1.2 host alert warnings related to data providers.

disable "print module" portal wide

dnn1 admin question

dnn 2 delete module confirmation

possible bug 3.0.11

dotnetnuke modules

can a module be written with asp.net web matrix?

salaro skin and yaf for dnn 3.0.13

dnn 3.0.8, error in module

any progress on single user base across multiple portals?

hiding modules based on roles

big problems with webhost4life - getting mad!

new core forums/blog/gallery?

split menu into 2 lines

 
Search This Site:

 
  Privacy | Contact Us
All Times Are GMT