C# - Excuting Javascript Commands From Cs?

Feb 19, 2011

Is there a way that I can call a function like (fadeIn or fadeOut) from the .cs?So thats my situation - I have a datalist of stuff. When A user clicks something on the list, it gives him some details about the thing he clicked and if he wants it, he clicks it again.now, on the first click I changed the OnClientClick of the button to fadeOut the datalist.so on the second click (after he confirms the item) it fades out.If he clicks one thing than click another thing, the fadeOut occurs.

View 4 Replies


Similar Messages:

.net - Nhibernate -- Excuting Some Simple HQL

Apr 16, 2010

I have map the entities in .hmb.xml and define attribute for all entity in classes.I have some basic accomplishment and get all the record using below code.

public List<DevelopmentStep> getDevelopmentSteps()
{
List<DevelopmentStep> developmentStep;[code]....

I have check from net that we can write HQL, Now the problem is how to execute this HQL like..

string hql = "From DevelopmentSteps d inner join table2 t2 d.id=t2.Id where d.id=IDValue";

What additional Classes or other thing I need to add to execute this kind of HQL?

View 1 Replies

Web Forms :: Excuting Server Side Then Fill Session With Value?

Jun 1, 2010

I m adding some value to database and get the id of the inserted record then pass it to a popup using session.the problem is when i click on save button the popup is opened on client side before finishing the server side and like this the session is null. i tried to check if the session that i pass is null then thread.sleep(1000) but unformtunatly this is not working.after that the popup finsihs loading if i refresh the page i got the data as the session now have value.

View 12 Replies

How To Run Shell Commands

Aug 3, 2010

How do i run a shell command in asp.net ?

I basically want something like system("netstat -an");

I don't want the output to be displayed to the user. Just want to run some maintainence commands ...

View 2 Replies

C# - Use Sql Command More Than Once With Different Commands?

Mar 28, 2011

I've been trying to use the same SqlConnection and SqlCommand objects to execute to different commands.

the first one checks for duplicate and the second one inserts the data if the data the user entered is not a duplicate.

Here's a sample of my code:

using (SqlConnection conn = new SqlConnection(ConnStr))
{
string Command = "SELECT CountryName FROM [Countries] WHERE CountryName = @Name";
using (SqlCommand comm = new SqlCommand(Command, conn))
{
comm.Parameters.Add("@Name", System.Data.SqlDbType.NVarChar, 20);
comm.Parameters["@Name"].Value = Name;
comm.Parameters.Add("@IsVisible", System.Data.SqlDbType.Bit);
comm.Parameters["@IsVisible"].Value = IsVisible;
conn.Open();
if (comm.ExecuteScalar() == null)
{
Command = "INSERT INTO [Countries] (CountryName, IsVisible) VALUES (@Name, @IsVisible);";
comm.ExecuteNonQuery();
}
}

I was trying to save a trip to the database by using one connection.

The Problem is:

The first command runs okay but the second command which inserts into the database won't work (it doesn't add any records to the db) and when I tried to display the rows affected it gave me -1 !!

The Question is:

Is this is the ideal way to check for a duplicate records to constraint a unique country ? and why the second command is not executing ?

View 4 Replies

C# - Executing Commands On Unix Box?

Feb 3, 2011

I'm in process to create a few utilities for my team to make life a bit easier working with our Unix boxes(most of them Solaris based).

For example I'm creating a ASP .NET page to display the output of TOP. Also plan to be able to restart processes with the KILL -15 command.

Now I wonder if there is any nice modules out the do the work for me or am I better off just going ahead with my own SSH communication?

It would of course make sense building the app on the unix box directly but I'm not able to do this.

View 1 Replies

How To SqlDataSource Update And Delete Commands

Sep 20, 2010

I have a simple gridview. I can view the data and I have gotten the insert to work (code behind).

Code:
Dim vRepairId As String = Request.QueryString("REPAIRID")
SqlDS_WOAccount.InsertParameters("WorkOrderID").DefaultValue = vRepairId
SqlDS_WOAccount.Insert()
<asp:GridView ID="GridViewAccount" runat="server" AutoGenerateColumns="False"
BackColor="White" BorderColor="#E7E7FF" BorderStyle="None" BorderWidth="1px"
CellPadding="3" DataSourceID="SqlDS_WOAccount" Font-Size="8pt" Width="100%">
<RowStyle BackColor="#E7E7FF" ForeColor="#4A3C8C" />
<Columns>

[code]...

View 31 Replies

Web Forms :: Encryption And Decryption Using Commands?

Mar 8, 2011

I have web.config file and it is encrypted completely and hosted in one server,Now I got one requirement to change admin person mail id. So I need to decrypt the web.config file and update the mail id then encrypt the config file again. Please tell me how to do this using aspnet_regiis -pdf commands?

View 1 Replies

C# - Add Multiple Commands To One Item Template?

Feb 9, 2011

I stripped this example to make it simple. I have a gridview with a template field. The template field contains two buttons and a label (They must be in the same template field). I want the first button to set the label text to "Win", and the other button to set the label text to "fail". The onrowcommand doesnt seem to be triggered by buttons in a template field. How can I accomplish this?

My gridview code is below:

<asp:GridView ID="GridView1" runat="server" EnableModelValidation="True" AutoGenerateColumns="False"
OnRowCommand="Gridview1_RowCommand">
<Columns>
<asp:TemplateField ShowHeader="False">

[Code]....

View 2 Replies

SQL Server ::set Condition With Union All Commands?

Mar 25, 2011

Below is my SQL query in which I have used UNION All In my outer query.so I want to select data onwards particulardate. [code]...

View 1 Replies

Gridview - Alternative Row / Select Commands?

Mar 16, 2012

In a gridview, how does one create/add more than one button where each does something different?

I need 3 buttons for each row in a gridview.

Each will open a different target page/url when clicked on. I've done this in classic asp but how does one do it in asp.net using gridview? Or should I be doing something else? Maybe a repeater or some other control? I would need sorting and paging too.

I am trying to duplicate the functionality of this classic asp application I created years ago:

[URL]

Search for street name="oaK"

The results of the search is what I need to duplicate in asp.net.

I have the basics done but can't figure out how to make additional buttons in the gridview of the results do different things in this asp.net application:

[URL]

View 3 Replies

Web Forms :: Execute SQL Commands Without Refreshing Page

Jun 24, 2012

I am executing Sql Command of insert

But after it inserts data into table it refreshes page and on refreshing, it is calling my javascript window.onunload event

Can we Execute sql command without refreshing page???

View 1 Replies

Web Forms :: C# - Adding Aspx Commands And Components To HTML?

Apr 25, 2010

Someone developed nice HTML pages for a new site. My assignment is to add the code to make the site working with SQLServer.

I know how to make a new site starting from VWD or VS2008 c#

What would be the best approach? Building a new site and afterwards trying to swap my HTML with the one provided? Or what?

View 3 Replies

Forms Data Controls :: Listview Row Commands Not Firing

Jul 14, 2010

I have a problem with listview and I can't find any useful solution.

Here is my situation:

I have a listview with insert row and i need to do some calculations as user types in. Some fields are not filled by user but computed by javascript function (they are not inserted into db, they are shown for informational purposes only). These fields are just textboxes - computed ones are disabled. So i want to add some javascript functions to handle the computation, but i need this functions to have proper IDs. So i add them dynamically on listview.itemcreated with attributes.add. And that's where the problem begins.

If I use textbox.attributes.add("onblur", "some code"), suddenly all row commands of insert row stop working. They seem to cause a postback (all filled fields are blank after) but they are not firing any event. ItemCommand, ItemInserted, ItemInserting... Nothing. I have a masterpage and updatepanel in my website but i don't think that is the source of all problems. If I clear all javascript events from all textboxes and dropdownlists, row commands are working again. But I really need some client side computation and validation and I don't know how to make it work and still can insert rows.

View 1 Replies

DataSource Controls :: Editable Gridview With Multiple Select Commands

May 14, 2010

I am trying to write an app that has one gridview, but I change the select on my sql data source to show different information on the same grid. For example I start showing units, but when price is selected I reassign my select command from Select sales.[sales1] to Select (sales.[price] * sales.[sales1]) as sales1.

However, this is causing a problem that I cannot understand with the built-in edit functionality of gridview. Whenever I click on edit, all the data in my gridview reverts back to the original select and displays only units. Am I missing something? When I change my select command the only things I am changing are my gridview.datakeynames, sqlsource.selectcommand, and sqlsource.updatecommand. What do I need to add to make my gridview edit using the current selectcommand?

View 3 Replies

Forms Data Controls :: Declare Custom Commands In Listview

Apr 24, 2010

Is it possible to declare custom commands within a listview control? For example, if I want to have a "Pay Now" link for each item in the listview, how would I do that?

View 2 Replies

Forms Data Controls :: Re-use Gridview Commands For Multiple Gridviews?

Feb 13, 2010

I plan on having multiple Gridviews on one page populated completely in code behind. The only difference between them will be the Stored Procedure. In an effort to save having to write the following for each gridview, can I reuse the commands for each of them. Below is a sample of one of the commands that I would like to use, as well as the bind sub that I am using.

I realize that it will not be at all difficult to cut and paste each of these lines, and making the minor edits for each one. I just would like to keep my code behind file thin, as well as only limiting the chance for mistakes by using multiple commands.

[Code]....

View 7 Replies

Execute Powershell Commands On Windows 2008 Server From Application?

Nov 26, 2010

I want to execute some powershell commands on a remote windows 2008 machine. Right now i am using psexec to run the powershell from c# asp.net application. I would like to know is there any way to execute powershell commands without using a third party tool like psexec?

View 1 Replies

Forms Data Controls :: How To Edit And Delete In Gridview Without Sqldatasource Commands

Feb 19, 2010

how do i edit and delete in gridview without sqldatasource commands?

View 2 Replies

Forms Data Controls :: Adding A Dropdownlistbox Into Edit & Update Commands On A Databound Gridview?

Sep 30, 2010

I have a datagridview that has a column which displays a ref value from another unbound table, but during an edit of a gridview entry i want a dropdownlistbox to list all the available ref values from the other unbound table source, then to insert the selected value into the bound table

View 1 Replies

Forms Data Controls :: Multiple Commands On The Codebehind After Button_click Event To Insert And Read Inserted

Nov 16, 2010

I want to be able to show the record that was just inserted after add_button_click event. I run the insert from mycommand and then set mycommand2 to run the read to populate a details view. I have a feeling I am going about this the wrong way. The insert fires correctly but the details view does not populate.

[Code]....

View 3 Replies

Web Forms :: How To Generate HTML Code By Commands From The Code Behind Page

Dec 30, 2010

how to generate HTML code from the code behind?

I would like to build a form that generate an html code inside a for loop.

I will let the user enter the photo name and No. of photos

Then I will generate an HTML code like this:

<a href="http://www.mzinj.org/images/gallery/Photo%20(1).jpg" target="_blank"> <img src="http://www.mzinj.org/images/gallery/Photo%20(1).jpg" alt="" width="345" height="247" /> </a> <br /> <a href="http://www.mzinj.org/images/gallery/Photo%20(2).jpg" target="_blank">
<img src="http://www.mzinj.org/images/gallery/Photo%20(2).jpg" alt="" width="345" height="247" /> </a> <br /> <a href="http://www.mzinj.org/images/gallery/Photo%20(3).jpg" target="_blank"> <img src="http://www.mzinj.org/images/gallery/Photo%20(3).jpg" alt=""
width="345" height="247" /> </a> <br />

depending on the No. of the photos the code will be duplicated in the loop

Then I will display the result of the loop in label or in a textarea to let the user copy it any where

The problem is that while compiling my code it considers the HTML code as a part of the behind file and gives errors on the single quote, the double quote and on the parentheses

View 4 Replies

DataSource Controls :: SQL Datasource Commands Not Working On Hosted Pages?

Dec 1, 2010

im explaining this base on a test page that i have hosted as i was trying to track down my problem, i have a hosted page which i have hosted on the internet on a hosting service provider. the page has a normal gridview that is linked to a SqlDataSource. and theSqlDataSource has sql statements for selecting data, updating and deleting. They all work fine locally and even if i host them locally through IIS. but on the hosting service they down work. only the select work, which means i can view my data on the gridview but i cant manipulate it, delete and updating dont wanna work, they dont do anything. and the worse part is that im not even getting an error from them, on the grid i have enabled the autogenerate edit button and the delete, how can i make the update and delete work, or what is it that makes them not to work. the code for my test page is below

[Code]....

View 2 Replies

Visual Studio :: Visual Web Developer 2010 Some Commands Not Appear In The Menu?

Mar 25, 2011

I use visual web developer 2010 some commands not appear in the menu when I write it in .asp.cs file like "AffectedRows"and it not work when I write it.I Want to choose this commandes from the menu.

View 1 Replies

Set An Index To A Single Word On Word-document, By Some Asp Commands?

Mar 3, 2011

I would like to know about commands of : How can I set an index to a single word on my word-document, by some asp commands.(Word-basic ...)Also, how to merge two files to a single word file (rtf).

View 1 Replies







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