.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

Display value based on particular input in Mysql-Asp.net

Posted By:      Posted Date: October 18, 2010    Points: 0   Category :ASP.Net

nI am working on work status project i have different columns..workNo(primary key),Name,startdate ,enddate,status(X,Y,Z) in database.I want view the status of the particular work with a single button click on to grid view when you give workno input from a textbox.how can i write the query for this, now i could display all records/history for particular workno on to grid view


View Complete Post

More Related Resource Links

Want to create Page URL rewrite based on Users GUID and Display name?



I am using the asp.net membership. 

On my site I have a Profile.aspx page.

In the code behind of this page,  i get the logged in UserId (Guid) and pass

this to a method in my DAL. GetUserByUserId()


In my database I have a Table called Member which the method gets the data from

and displays details on the page about  the user.


What I want to happen is when they have logged in and are diverted to Profile.aspx,

the page URL shows www.MyWebSite/Profile/UsersName 

for example



is this possible. In my Member table I have FirstName and LastName columns or do I get the

name from the membership table.


even better would be they go straight to www.MyWebsite/JohnSmith.aspx


thank you for any help






how to hide/display controls in NewForm.aspx based on dropdown value in SharePoint list



I have 1 dropdown in my sharepoint list with other columns. If dropdown value equal to 'xyz' i need to display some other controls, otherwise these controls should be hidden.

I know we can achieve this with javascript. If any one can provide code or sample then it will be appreciated. or is there any other alternative methods to do this ........

Thanks & Regards, Neerubee

Programmatically creating a SharePoint Site based on user input


I am working on developing a “Create Website Wizard” for SharePoint 2007 that would do the following (I am simplifying a little for the sake of this post):


1.      Take user input as follows:



Product Code:

Category (I, II, III):

The category will be a choice field (radio buttons or a dropdown)

How to display breakpoint and debug visual cues with custom activity designer based on WorkflowViewE

Hi,   I am developing custom activity designers based on "WorkflowViewElement" instead of "ActivityDesigner" in my xaml. It allows me to have greater control of the look and feel of the designer. However I noticed that with this approach, the breakpoint visual cue (Dark red solid circle that appears on the left side of the designer when you set breakpoint on the designer) is not visible. It works fine when you write your designed based on "ActivityDesigner". The same behavior happens to the debug visual cue when you debugging the WF. It appears as bright yellow rectangle surrounding the activity designer if you are based on "ActivityDesigner", but it is not available when your designer is based on"WorkflowViewElement". Any help is highly appreciated. Li

Form input to output as a link on the display page (need help please)

 I have a form, the form works great and displays the information perfectly on a designated display page I have set up from its database.  One problem, I want to display it as a link to the site instead of how it is now, just plain text. Thus the user would put in the text box the site and hit submit and the site would appear of the display page.  Can anyone please assist me on this, and where to drop the hyperlink control? in the form page? or in the display page?    Below is my form code page:     <p><strong><font face="Verdana, Arial, Helvetica, sans-serif">International Access Entry      Form</font></strong></p><p><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Please enter information      international contact information below. This if for authorized staff only.</font></p><table width="548" border="0" cellpadding="0" cellspacing="10" bgcolor="f0f0f0">  <tr>    <td width="528"><form name="INTL_Form" method="post" action="INTL-results.asp">      <p><font face="Verdana, Arial, Helvetica, sans-serif"> </f

display files to download based on who is logged in

I have an asp.net web app. I have secure parts to the website and currently I have it setup so that people can login with their domain accounts. The are three secure sections to the site, all of which require files of interest be displayed to the user so they can download them.Okay so this is how I see it working, people come to the home page and select on one of the three options. At this point they are prompted for there domain password then they are navigated to the secure page and a bit of code populates the page with file downloads based on who they are logged in as.The files themselves will be uploaded to the website and kept in folders named after the username. so for instance the user edwardh would be displayed the files in the folder /downloads/edwardh.I'm not sure where to start with this, any direction? 

Display records in bold coming from mysql database

hi,I have Mysql database.In that some records status is New.now,I bind database table to Listview(asp) control.What's my problem is,the New status records(from Mysql database) text in Listview(after binding) is visible in bold format.how to do this??Thanks in advance.

display modalpopup after clicking the linkbutton in grdview with the data based on bound vale

Hi I have gridview with link button as itemtemplate.i want to display the modalpopup after clicking the linkbutton in the gridview.This modalpopup should dispaly some data based on the value associate with the linkbutton.Please helo me. 

How to display TreeViewItems different ways based on the item type under a single node?

Hi, I am having trouble trying to display hiearchical data under each node in two different ways depending on the data.  I hope someone will be able to provide me some help on this since I am rather new to WPF development. Maybe I am going about this all wrong but for now, I am trying to create a customized TreeView to represent data similar to the xml I provided in the code below.  The <ItemsPresenter/> instances listed in the code are not exactly doing what I need.  I will probably need to filter the content that I list with each of the two <ItemsPresenter/> tags based on the type of each item although I have no idea if this is possible.   <Window x:Class="Wpf_treeview_testing.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Window1" Height="300" Width="300"> <!-- * The "xmlData" describe roughly the type of data that I require visual representaion of. * Since I could not find a WPF Control that will present a Hierachical Data Template close to what we need, I am trying to setup a TreeView to represent this information by using a ControlTemplate for TreeViewItem. * The preferred result is to present different items types in

Dynamically display images based on a variable - JavaScript

I am trying to bring in a specific image based on a variable brought into the page with a querystring. I initially thought having an array with the image's URL in it would work, but I am having problems associating the array index with the variable. Any help with this would be greatly appreciated. Dave 

Display Value Based on ID Field in Datalist


This should be very simple but I guess my mind is even more simple.

I am trying to display a starting date from an access database based on the dateId field in a datalist.

On page 1 (using a master page) the customer selects a starting date from a dropdownlist. When the customer hits the submit button, they are transferred to page 2 where the selected starting date is displayed.

The database table is basically:

DateID Startingdate

1             1/1/2010

2             2/1/2010

3             3/1/2010

4             4/1/2010

5             5/1/2010

The dropdownlist from page 1 is:

<asp:DropDownList class="formtextbox" ID="DrpStartCov1" runat="server" 
                DataTextField="Date" DataValueField="DateID">

My select command is:
SelectCommand="SELECT [NextMonth], [DateID] FROM [List]"
As I mentioned

Display columns in matrix based on a group even if data don't exist in resultset


I am trying to create columns in a matrix for data that currently does not exist.  I created a matrix that groups on office name (ROWS) and Month of Appointment Date (Columns).

For example, the matrix currently looks like this.....

  January February March April

ForeignKey display values based on criteria, metadata model


I have a table with 3 columns, {id,name,display}.  ID being primary key, Name being first string in table(dynamic data will populate any dropdown's with this value, unless overridden), and Display being a bit/boolean. 

I have a custom page(Master/Detail) created making use of asp:DynamicControl and asp:DynamicField.  Several of the associated Controls/Fields are ForeignKeys.  When editing/inserting the controls use the ForeignKey FieldTemplate.  Ideally, this works great!  However, I need a little bit more control over which data items get displayed from the database(selectable values).  This seems like it should be easy, yet, I cannot get my head around it. 

OBJECTIVE: When 'display' == true, show name in list.  When 'display' == false, do not show name in list. 

QUESTION: Is there a way to handle this within the metamodel using metadata attributes, etc...?  Please advise... 



Display name for Claims-Based authentication


Hi to all,

I'm setting up a new Sharepoint 2010 server on a Windows 2008 x64. I need to use Form autentichation taking user from a LDAP. The connection with the LDAP work correctly, this is my provider:

<add name="LdapMembership" type="Microsoft.Office.Server.Security.LdapMembershipProvider, Microsoft.Office.Server, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c"
   server="[omitted]"   port="389" 

display images randomly from mysql database


Hello to everybody,Smile

I'm a beginner in aspnet programming and I thought to become a member of this forum to learn better how to

program in this language (I use c# as code-behind language and visual studio 2008 environment).

I have a problem to solve: I want to display, on an aspnet page load, 12 random images taken from a mysql


I used connector-net in order to make mysql recognized by visual studio, I established a connection with the

database and I could display the content of 12 random rows of the table (eg ImageName, see below).

The database contains these columns:

ImageCode, ImageName, MaskName, ImageType

For example for the first row I have:

1 (ImageCode)

'C:\Inetpub\wwwroot\kf2\images\fuoco_bmp\fire10_res_res.bmp' (ImageName)


0 (ImageType)

I post you the code of the pageload I have written:

protected void Page_Load(object sender, EventArgs e)

MySql.Data.MySqlClient.MySqlConnection conn;

string myConnectionString =

input parameter to MySQL


Dear All,

I have below code that I want to make a input parameter into the SQL ?, it can be where clause or empty string. But it prompt exception???

select * from a inner join
(select * from b ? ) c on a.aclink=c.aclink

Dataset.DS_CategoryReport.DT_CatItemsDataTable rDT = this.GetData(dateClause);


public virtual DS_CategoryReport.DT_CatItemsDataTable GetData(string Parameter1) {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            if ((Parameter1 == null)) {
                this.Adapter.SelectCommand.Parameters[0].Value = global::System.DBNull.Value;
            else {
                this.Adapter.SelectCommand.Parameters[0].Value = ((string)(Parameter1));

Local IIS doesn't serve up or (IE doesn't display) any XML based documents.


I can not display any XML based documents hosted on my local IIS. It refuses to serve even the simples for xml documents. I cannot, for example, run 'svcutil.exe http://localhost/my.wsdl' but I can 'svcutil.exe C:\Intetpub\wwwroot\my.wsdl'. None of my websites display properly. I may add that I'm running IIS 7 on Win2008R2, 64bit hosted in VM.

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend