this shows compilation error Please let me know how to show the value of the variable in the pop up. I am using webform and C# in ASP.NET. Thanks and Regards Ipsita [email]ipsita.mohanty@gmail.com[/email] (Ipsita) wrote in message news:...[quote] > Hi, > > I am explaining the scenario of what I am trying to do: > - I have a webform with some controls, from which I am taking the > data. eg say Username, password > - I am passing these data as parameters to the web service method > result = serviceproxy.VerifyUser(username, password) on the event of > the "Submit" button_click. > - The webservice webmethod uses the username, password to verify if > the user is valid user. If no, it sends an error message to the client > say "Invalid Username" which gets stored in the variable "result" as > shown above. > - I need to show this message stored in variable "result" in a popup > box on the client side. And when the user clicks "OK" on the popup box > he can continue further. > > In my button_Click method I am doing the following: > string strScript, result; > Client.proxy serviceproxy = new Client.proxy(); > result = serviceproxy.VerifyUser(username, password) ; > strScript = ""; > > I am stuck now..I dont know what exactly to do. Do I need to add > something to the html file? > > Can anyone tell me the way to do this? Please let me know. > > Thanks and Regards > Ipsita[/quote] [allowsmilie] => 1 [showsignature] => 0 [ipaddress] => [iconid] => 0 [visible] => 1 [attach] => 0 [infraction] => 0 [reportthreadid] => 0 [isusenetpost] => 1 [msgid] => [ref] => [htmlstate] => on_nl2br [postusername] => Ipsita [ip] => ipsita.mohanty@ [isdeleted] => 0 [usergroupid] => [membergroupids] => [displaygroupid] => [password] => [passworddate] => [email] => [styleid] => [parentemail] => [homepage] => [icq] => [aim] => [yahoo] => [msn] => [skype] => [showvbcode] => [showbirthday] => [usertitle] => [customtitle] => [joindate] => [daysprune] => [lastvisit] => [lastactivity] => [lastpost] => [lastpostid] => [posts] => [reputation] => [reputationlevelid] => [timezoneoffset] => [pmpopup] => [avatarid] => [avatarrevision] => [profilepicrevision] => [sigpicrevision] => [options] => [akvbghsfs_optionsfield] => [birthday] => [birthday_search] => [maxposts] => [startofweek] => [referrerid] => [languageid] => [emailstamp] => [threadedmode] => [autosubscribe] => [pmtotal] => [pmunread] => [salt] => [ipoints] => [infractions] => [warnings] => [infractiongroupids] => [infractiongroupid] => [adminoptions] => [profilevisits] => [friendcount] => [friendreqcount] => [vmunreadcount] => [vmmoderatedcount] => [socgroupinvitecount] => [socgroupreqcount] => [pcunreadcount] => [pcmoderatedcount] => [gmmoderatedcount] => [assetposthash] => [fbuserid] => [fbjoindate] => [fbname] => [logintype] => [fbaccesstoken] => [newrepcount] => [vbseo_likes_in] => [vbseo_likes_out] => [vbseo_likes_unread] => [temp] => [field1] => [field2] => [field3] => [field4] => [field5] => [subfolders] => [pmfolders] => [buddylist] => [ignorelist] => [signature] => [searchprefs] => [rank] => [icontitle] => [iconpath] => [avatarpath] => [hascustomavatar] => 0 [avatardateline] => [avwidth] => [avheight] => [edit_userid] => [edit_username] => [edit_dateline] => [edit_reason] => [hashistory] => [pagetext_html] => [hasimages] => [signatureparsed] => [sighasimages] => [sigpic] => [sigpicdateline] => [sigpicwidth] => [sigpicheight] => [postcount] => 2 [islastshown] => [isfirstshown] => [attachments] => [allattachments] => ) --> this shows compilation error > > Please let me know how to show the value of the variable in the pop > up. I am using webform and C# in ASP.NET.[/quote] Visual Basic uses & to concatenate strings (this is the reason the C# compiler gives you an error). In C#, use +. Label1.Text = ""; Derek Harmon [allowsmilie] => 1 [showsignature] => 0 [ipaddress] => [iconid] => 0 [visible] => 1 [attach] => 0 [infraction] => 0 [reportthreadid] => 0 [isusenetpost] => 1 [msgid] => [ref] => [htmlstate] => on_nl2br [postusername] => Derek Harmon [ip] => loresayer@msn.c [isdeleted] => 0 [usergroupid] => [membergroupids] => [displaygroupid] => [password] => [passworddate] => [email] => [styleid] => [parentemail] => [homepage] => [icq] => [aim] => [yahoo] => [msn] => [skype] => [showvbcode] => [showbirthday] => [usertitle] => [customtitle] => [joindate] => [daysprune] => [lastvisit] => [lastactivity] => [lastpost] => [lastpostid] => [posts] => [reputation] => [reputationlevelid] => [timezoneoffset] => [pmpopup] => [avatarid] => [avatarrevision] => [profilepicrevision] => [sigpicrevision] => [options] => [akvbghsfs_optionsfield] => [birthday] => [birthday_search] => [maxposts] => [startofweek] => [referrerid] => [languageid] => [emailstamp] => [threadedmode] => [autosubscribe] => [pmtotal] => [pmunread] => [salt] => [ipoints] => [infractions] => [warnings] => [infractiongroupids] => [infractiongroupid] => [adminoptions] => [profilevisits] => [friendcount] => [friendreqcount] => [vmunreadcount] => [vmmoderatedcount] => [socgroupinvitecount] => [socgroupreqcount] => [pcunreadcount] => [pcmoderatedcount] => [gmmoderatedcount] => [assetposthash] => [fbuserid] => [fbjoindate] => [fbname] => [logintype] => [fbaccesstoken] => [newrepcount] => [vbseo_likes_in] => [vbseo_likes_out] => [vbseo_likes_unread] => [temp] => [field1] => [field2] => [field3] => [field4] => [field5] => [subfolders] => [pmfolders] => [buddylist] => [ignorelist] => [signature] => [searchprefs] => [rank] => [icontitle] => [iconpath] => [avatarpath] => [hascustomavatar] => 0 [avatardateline] => [avwidth] => [avheight] => [edit_userid] => [edit_username] => [edit_dateline] => [edit_reason] => [hashistory] => [pagetext_html] => [hasimages] => [signatureparsed] => [sighasimages] => [sigpic] => [sigpicdateline] => [sigpicwidth] => [sigpicheight] => [postcount] => 3 [islastshown] => 1 [isfirstshown] => [attachments] => [allattachments] => ) --> How to show popup message in a webform - ASP.NET Web Services

How to show popup message in a webform - ASP.NET Web Services

Hi, I am explaining the scenario of what I am trying to do: - I have a webform with some controls, from which I am taking the data. eg say Username, password - I am passing these data as parameters to the web service method result = serviceproxy.VerifyUser(username, password) on the event of the "Submit" button_click. - The webservice webmethod uses the username, password to verify if the user is valid user. If no, it sends an error message to the client say "Invalid Username" which gets stored in the variable "result" as shown above. - I need to show ...

  1. #1

    Default How to show popup message in a webform

    Hi,

    I am explaining the scenario of what I am trying to do:
    - I have a webform with some controls, from which I am taking the
    data. eg say Username, password
    - I am passing these data as parameters to the web service method
    result = serviceproxy.VerifyUser(username, password) on the event of
    the "Submit" button_click.
    - The webservice webmethod uses the username, password to verify if
    the user is valid user. If no, it sends an error message to the client
    say "Invalid Username" which gets stored in the variable "result" as
    shown above.
    - I need to show this message stored in variable "result" in a popup
    box on the client side. And when the user clicks "OK" on the popup box
    he can continue further.

    In my button_Click method I am doing the following:
    string strScript, result;
    Client.proxy serviceproxy = new Client.proxy();
    result = serviceproxy.VerifyUser(username, password) ;
    strScript = "<script language=JavaScript>alert('" & result &
    "')</script>";

    I am stuck now..I dont know what exactly to do. Do I need to add
    something to the html file?

    Can anyone tell me the way to do this? Please let me know.

    Thanks and Regards
    Ipsita
    Ipsita Guest

  2. #2

    Default Re: How to show popup message in a webform

    Hi!

    I was able to show a message as an alert. On the client side I used:
    Label1.Text = "<script language=JavaScript>alert('Hello');</script>";

    The value 'Hello' shows in the pop up alert.

    Next phase of the problem is that instead of showing a fixed message
    ie 'Hello' in the alert, if I wanted to show the contents of a string
    variable, how do I do it?
    eg string strMessage = "Excellent";
    Label1.Text = "<script language=JavaScript>alert('" & strMessage &
    "');</script>"; ----------> this shows compilation error

    Please let me know how to show the value of the variable in the pop
    up. I am using webform and C# in ASP.NET.

    Thanks and Regards
    Ipsita


    [email]ipsita.mohanty[/email] (Ipsita) wrote in message news:<ef1b2b65.0411131006.50ec0fa2posting.google. com>...
    > Hi,
    >
    > I am explaining the scenario of what I am trying to do:
    > - I have a webform with some controls, from which I am taking the
    > data. eg say Username, password
    > - I am passing these data as parameters to the web service method
    > result = serviceproxy.VerifyUser(username, password) on the event of
    > the "Submit" button_click.
    > - The webservice webmethod uses the username, password to verify if
    > the user is valid user. If no, it sends an error message to the client
    > say "Invalid Username" which gets stored in the variable "result" as
    > shown above.
    > - I need to show this message stored in variable "result" in a popup
    > box on the client side. And when the user clicks "OK" on the popup box
    > he can continue further.
    >
    > In my button_Click method I am doing the following:
    > string strScript, result;
    > Client.proxy serviceproxy = new Client.proxy();
    > result = serviceproxy.VerifyUser(username, password) ;
    > strScript = "<script language=JavaScript>alert('" & result &
    > "')</script>";
    >
    > I am stuck now..I dont know what exactly to do. Do I need to add
    > something to the html file?
    >
    > Can anyone tell me the way to do this? Please let me know.
    >
    > Thanks and Regards
    > Ipsita
    Ipsita Guest

  3. #3

    Default Re: How to show popup message in a webform

    "Ipsita" <ipsita.mohanty> wrote in message news:ef1b2b65.0411141838.41732818posting.google.c om...
    > if I wanted to show the contents of a string variable, how do I do it?
    > eg string strMessage = "Excellent";
    > Label1.Text = "<script language=JavaScript>alert('" & strMessage &
    > "');</script>"; ----------> this shows compilation error
    >
    > Please let me know how to show the value of the variable in the pop
    > up. I am using webform and C# in ASP.NET.
    Visual Basic uses & to concatenate strings (this is the reason the C# compiler
    gives you an error). In C#, use +.

    Label1.Text = "<script language=JavaScript>alert('" + strMessage + "');</script>";


    Derek Harmon


    Derek Harmon Guest

Similar Threads

  1. Question Show Popup menu behavior
    By prashantg208 in forum Brainstorming Area
    Replies: 0
    Last Post: April 1st, 10:27 AM
  2. Replies: 9
    Last Post: October 18th, 04:32 PM
  3. Popup Message
    By CCBrown in forum Macromedia Dynamic HTML
    Replies: 1
    Last Post: September 6th, 09:56 AM
  4. How do I make my control show up in the webform?
    By KJ in forum ASP.NET Building Controls
    Replies: 0
    Last Post: May 11th, 08:47 PM
  5. Update webform with changes in a popup form
    By Steve C. Orr, MCSD in forum ASP.NET General
    Replies: 0
    Last Post: August 8th, 08:36 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •