How To Display Message Boxes In Shared Function

Jan 9, 2012

My problem is that IIS does not support alert and message boxes.so i am using

Me.Page.ClientScript.RegisterStartupScript(Me.GetType(), "SetStatusText", "<script type='text/javascript'> alert('In catch...On page load.'); </script>")

but it is not working in shared function as i am calling shared function from javascript.

i want to show an alert box in the shared function.

below is my function

Code:
<System.Web.Services.WebMethod()> _
Public Shared Function DeleteCircular(ByVal cilr_code As Int64, ByVal status As String, ByVal from_period As Date, ByVal to_period As Date) As Integer
If status = "delete" Then
Dim conn As SqlConnection
Dim cmd As SqlCommand
Dim sql, connstr As String

[code]....

View 10 Replies


Similar Messages:

WCF / ASMX :: How To Call A Non Shared Function In A Shared Function

Nov 12, 2010

I want to call a non shared function in a shared function in which i am having a textbox control instance. Its giving no error but when i call this shared function from client callback it gives me no response

Any Idea except removing shared from the function.

Here is my code :

<WebMethod()> _
Public Shared Function myF() As String
Dim pg As New _Default
Return "{'Hello':'" & pg.setText & "'}"
End Function
Public Function setText() As String
Dim pg As New _Default
pg.TextBox1.Text = "This is a test"
Return pg.TextBox1.Text
End Function

View 2 Replies

Using Shared Function In A Separate DLL

Jan 18, 2011

I have CMS and FAQ as 2 different modules/projects each uses a different DLL file. When those two modules was structured as the same application. I was using the following piece to get the FAQs categories as part of my menu

[Code]....

Now those two modules are separated. .. Can I use the following shared function which is already exist in the FAQ separate DLL to loop the categories? and how can I do it?

[Code]....

View 5 Replies

Refer Shared Function In Its Own Class?

Mar 2, 2010

how to refer shared function in a class , this function itself inside same class

public class cls1

Public Shared Function getDBDate(ByVal pDate As Date) As String
Return Format(pDate, "yyyy-MM-dd")
End Function

Private Function GetDb_Format(ByVal pDateString) As String
Dim d As Date = Me.ParseDate(pDateString)
Return clsDate.getDBDate(d)

End Function

End Class

can i have any other way to use getDbDate function

View 2 Replies

C# - Call A Shared Function Which Its Name Came As A Parameter?

Jun 21, 2010

In a method, I want to call a shared function which its name came as a parameter. For example:

private shared function func1(byval func2 as string)
'call func2
end function

View 2 Replies

Calling Other Functions From A Shared (or Static) Function

Aug 20, 2010

I get this error: Cannot refer to an instance member of a class from within a shared method or shared member initializer without an explicit instance of the class.

Partial Class _Default
Inherits System.Web.UI.Page
<WebMethod()> _
Public Shared Function ParseData() As String
Dim value as string = GetValue()
End Function
Private Function GetValue() as String
Return "halp"
End Function
End Class

I know it has something to do with the fact that the first function is shared and the second function should probably be Public as well but I don't fully understand the reason behind it. Probably not relevant but I'm calling the web method from some javascript.

View 1 Replies

Web Forms :: Unable To Get The Label Text Into Public Shared Function

Jan 12, 2010

I am using the following code for slide show of AjaxToolkit. It works. But I wanna get the label1.text as picture name But I cannot do it in public shared function ! How can I do that !

[Code]....

View 6 Replies

Private Shared Vs Public Shared Vs Protected Shared

Jan 5, 2010

let me know what does these access modifiers means.private shared vs public shared vs protected shared

View 5 Replies

AJAX :: Get The Label.text In _Public Shared Function Resimler() As Slide()?

Jan 21, 2010

I have the following code for ajaxtoolkit slideshowextender's service method. I want to get the label1.text value to make the pictures diynamic. I hope you know what I mean. Bu I cannot ! here is my vb code;

[Code]....

I tired the below one but didn't work;

[Code]....

View 12 Replies

Forms Data Controls :: Pass A Texbox.text To A Public Shared Function?

Jan 12, 2010

I have a gridview that is dynamically created and have finished all but one problem - I need for my code that is within a Public Shared Function to access a textbox string - In the below I need myinput to return the string so that my query's can use the variable - the below shows: Cannot refer to an instance member of a class from within a shared method or shared member initializer without an explicit instance of the class.

If I remove the "Shared" the error goes away however it crashes other parts. (if I hard code the text then all works as expected)

[Code]....

View 3 Replies

Web Forms :: Display Error Message From Catch Block In Message Box?

Nov 11, 2013

no Massagebox not working in the web

at catch I want appear windows and retuen to....

try 
{
}
catch (Exception ex) {Console.WriteLine("Error reading from", ex); }

View 1 Replies

How To Display The Net Amount Of A Calculation In Two Text Boxes

Nov 13, 2010

I want to display the net amount of a calculation in two text boxes

if netamount = 45.60

first textbox should show rounded value and next textbox should show what is rounded.

I have earlier done this with c by a manual progam of rounding and now my manager dont want me do something like that because he believes c# has all math in build fucntions. So please help me friends.... I want to get the value that is rounded not numbers after the decimal i want to round a number with 10 precisions like 45.8456789990 and get a result like 46 in one textbox and 85 in another.

The asker has a number like double pi = 3.14159265d; and wants to end up with two message boxes after the fact: [ Whole Number] 3 and [2 Decimal Places] 14 and he wants to know how to best achieve this affect. He only knows that he will be given a double, but he does not know whether that number will have fractional values.

View 5 Replies

ADO.NET :: SQL Column Values To Display In Text Boxes

Aug 13, 2010

I am hoping this is not a silly question but I have been struggling to find an answer. I have created a web application to insert data into SQL database using T_SQL and stored procedures as I needed to update several tables at the same time. The design of a particular page is using text boxes and dropdown list's and not the default gridviews or details view as I wanted the page structure set out in a particular way. Anyways I now want to create an update page which I will get redirected to from a search page.My question is how do I assign the column values to text boxes or Dropdown lists from my Select statement. I was thinking of having a event in the page load method. Sort of like this 'Select InvoiceID, Invoicetype, Notes FROM TblInvoice Where Invoicenumber = @Invoicenumber " the parameter value @Invoicenumber will be assigned via the search page so I will also need to pull that in on the page load event. So my page would look something like this if say the:-

Textbox1 = InvoiceID(Value)
DropDownnlist1 = Invoicetype(Value)
Textbox2 = Notes(Value)

how to write this in a code behind page. I would then click a button to update the values if I changed them and write my update statement for the button click event which I know how to do .

View 3 Replies

How To Display A 1056 Character Message In Message Box In C#

Nov 11, 2010

How to display a 1056 character message in message box in asp.NET C#.

Response.Write("<script>alert(' " + a + " ')</script>");

The above code just accepts 54 characters only.I need some other way to display the error messages for a whole page.

View 5 Replies

Web Forms :: How To Display The Column Of The Row Selected To Appear In The Text Boxes

Oct 27, 2010

Im trying to use datarow to allow me to traverse through rows. how to display the column of the row selected to appear in the text boxes.

Private Sub NavigationButtons_Click(ByVal senders As Object, ByVal e As System.EventArgs) Handles FirstButton.Click, _

View 3 Replies

Display Record Data In Individual Text Boxes?

Mar 8, 2010

I need to display record data in individual text boxes, not in a gridview and I can't find any examples of how to do this anywhere (maybe looking in the wrong place).

View 17 Replies

Web Forms :: How To Use Varchar Table Value To Display Checked Boxes

Jan 21, 2010

To preface, I have just started leaning ASP.NET and have not worked with VB in 10 years. My boss just dropped an "easy" project in my lap that I don't even know how to start and he wants it done tomorrow (literally).

The desired output is simple - a form elsewhere on the site uses a field called status codes associated with a record to limit the values (other status codes from the same list) in a dropdown box. He wants a page that enables an admin to change what values are available in the dropdown box:

It should have a dropdown box where the admin can select a status code to update.

Then it should have a 2 column grid listing all status codes. The first column should consist of checkboxes where those in a lookup field (used to limit the dropdown values mentioned above) are already selected. The admin should be able to check/uncheck all the boxes and update the lookup field. The table has basically three fields:

Status ID: a numeric ID (ex. 10)
Status Code: a description (ex. "Sent to SSC")

Lookups: varchar, comma separated values that correspond to Status ID (ex. 10,20,30,190,980,990)

The Lookups field confuses me the most. I'm guessing that I need to read in the values into an array and write something to check the boxes that match. Then an update statement to combine back together with commas and update the field. I have no idea how to do any of that. All I have so far is a dropdown box listing status codes.

View 6 Replies

MVC :: Display Drop Down And Text Boxes Inside A Grid

Feb 2, 2011

I want to display the whole row of the table inside a grid as one row. so I have a table that has First name last name Age scoresInside a Telerik MVC grid I want to display

First Name and the name of the person in the text box, beneath the first name , I want yo display Last name and the name of the person in a text box, same thing with age and I want to display scores in a drop down list box so that users can look at the value and edit at the same time. I only want to display one record at a time.

I can display one record at a time, but i am not sure how to edit the records and show the empty text boxes and drop down list inside the grid.

[Code]....

I tried the above code, but that displays the text boxs in one row. i need to display one text box for name and then directly beneacth it, i want to display lastname and test box and then drop down list box right next to the text box.

View 6 Replies

C# - Using A Few Text Boxes To Display And Save Data To Database?

Feb 11, 2011

Let's say I have a db table like so:Then I have a product edit form that has 3 textboxes in which the user can save up to 3 different notes for a specific product. What is the best way to handle populating and then saving the data? If I use the code below to display it, how do I save it, as the textbox doesn't know the id of the note is.

[code]...

View 1 Replies

Web Forms :: Custom Validator Validates Three Text Boxes And Give Errorto Fill The Boxes

Apr 20, 2010

I have a custom validator which validates three text boxes. my code is,

[Code]....

I fill in all the three textboxes.it still gives me the error message to fill in all the boxes and does not submit the page even when all the three boxes are filled.

View 3 Replies

Forms Data Controls :: Display The Datgrid Content To Text Boxes?

Jul 9, 2010

i am having a treeview like

AchFile
|-> FileHeader(At this when i click on this i will have the text files associated to that )
|-> FileHeader7.6.2010.txt
|-> FileHeader7.7.2010.txt and so on

Now when i click on the text file i am displaying the content of text file in a data grid...

Now what i need is when i click on data grid i would like to display those values in a form in appropriate order.

View 1 Replies

Display List Of Html File & Folders From A Shared Folder?

Mar 11, 2011

We have an aspx page that displays list of html file & folders from an shared folder. The html files and folder within this shared folder is being maitained by the end users. These are the static html files. When user clicks on any of the file, our .net code open up that file in the new window.

Recently there was an change in the requirement. End user wanted to display some of the data dynamically in the HTML page. We the asked end users to replace the static/hard coded data(eg. City name) within the html files. Find below sample code for your reference

Existing code in html

[Code]....

New code in html

[Code]....

To achieve this our .net code looks for the tag values(State or City) within the lookup table in SQL DB. It then gets the value from the respective tag from DB and replaces the custom tag with the DB value

Eg: <TAG:DYNAMIC value="State"> is being replaced by the value of the State tag in DB.

In order to achieve this we parse the entire html file and then replace the dynamic tags with the DB value. The parsing happens quick in smaller html files but takes almost 10-12 secs to parse bigger files (around 255KBs). We also noticed that even though we increase the number of our custom tags within the bigger files, the code takes same time to open the parsed html file. So it looks like DB hit is not an issue and looks like the issue lies in the parsing of the files. Find below code that parses the html file

[Code]....

On further analysis we noticed the while loop within the above code takes longer to execute. Let me know if there is any better and faster way to parse bigger html files.

View 1 Replies

Forms Data Controls :: How To Display Values In Text Boxes When Clicked On Any Row In Gridview

Dec 31, 2010

I have a gridview in my aspx form. I have used template column & in that created a table. In the table of the Item template , I am displaying some fields. My requirement is that when I click on any row, the correspoding data should be placed in proper text boxes. Each row in itemtemplate has a unique id called UserId.

View 9 Replies

Forms Data Controls :: Space In Text Boxes & Drop Down Lists / Text Boxes Gets A One Tab Spacing?

Jan 20, 2011

Using C# and SQL as the database.I have a page with a gridview and some text boxes and drop down list boxes. A user selects a record from the grid view I query the database and fill the text boxes and drop down list boxes.

Some fields get updated periodincally thus there is no data in those fields in the database until some time.

A strange thing happens.When filling data some text boxes gets a one tab spacing .

View 1 Replies

DropDown List Boxes And Get The Value Of It Both Boxes?

Mar 26, 2010

I have two dropdown list boxes I select the first one and I get the index value of what i selected say item number 2,Using that indexvalue I would like to acccess the second dropdown box and get the value of it Both boxes will have the same amount of items in it.

View 4 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved