如何在asp.net中弹出显示图像?

时间:2017-10-07 05:49:53

标签: c# asp.net

我想在asp.net的网格视图中单击链接按钮时显示弹出窗口。在数据库中,我使用字节类型存储图像。我用HTML编写代码

void main()
{

    int x,y,i ;
    int precision = 2 ; /*Insert precision here*/
    char a[precision] ;
    long double z,result ;

    printf( "Input : " );   
    scanf( "%d" , &x );

    for ( i = 0 ; i <= precision  ; i++ )
    {

        a[i] = getchar();

        if ( a[i] == 10 ) break;

    }

    a[0] = '0';
    a[i] = '\0';

    y = atoi(a);
    z = y / pow( 10 , i-1 );
    result = x ;

    if ( z != 0 ) result = result + z ;

    printf( "Output: " );   
    printf( "%.*Lf\n", i-1 , result );

}

当我单击视图按钮时,页面已加载但图像未显示,则不会发生任何错误。

1 个答案:

答案 0 :(得分:0)

要在弹出窗口中显示图像:在弹出窗口中,将父页面中的记录ID作为查询字符串传递,并在弹出页面上获取此ID,将字节转换为图像并在图像标记中显示