多个用户访问相同的变量 [英] Multiple Users accessing same variable

查看:46
本文介绍了多个用户访问相同的变量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在vb.net中托管了一个Asp网站.网站是所有关于计算平均值的事情,当两个用户打开我的网站并尝试进行任何计算时,它将显示RUNTIME错误.当一个用户使用该网站时,它可以正常工作.解决方案是什么.

使用组合框时,组合框中列出的项目是A,B,C.每个项目都具有10、9、8之类的值.
计算按钮以找到平均值.
当用户使用相同的组合框时会导致错误.
http://www.aug.somee.com/ [

I''ve hosted an Asp website in vb.net . website is all about calculating average, when two user opens my website and tries to make any calculation it shows RUNTIME error. When a single user uses the website it works properly. What would be the solution.

Am using using combo box listed items in combo box are A,B,C . each items holds value like 10,9,8.
Calculate button to find the average.
when to users uses same combo box it results error.
http://www.aug.somee.com/[^]
this is my website .

Dim tot1 As UInt32

Public Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
        tot1 = 21
        If DropDownList1.SelectedValue = 0 Then
            tot1 = tot1 - 3
        End If
        If DropDownList10.SelectedValue = 0 Then
            tot1 = tot1 - 3
        End If
        If DropDownList11.SelectedValue = 0 Then
            tot1 = tot1 - 3
        End If
        If DropDownList12.SelectedValue = 0 Then
            tot1 = tot1 - 4
        End If
        If DropDownList13.SelectedValue = 0 Then
            tot1 = tot1 - 4
        End If
        If DropDownList14.SelectedValue = 0 Then
            tot1 = tot1 - 2
        End If
        If DropDownList15.SelectedValue = 0 Then
            tot1 = tot1 - 2
        End If


        sem1 = ((DropDownList1.SelectedValue * 3) + (DropDownList10.SelectedValue * 3) + (DropDownList11.SelectedValue * 3) + (DropDownList12.SelectedValue * 4) + (DropDownList13.SelectedValue * 4) + (DropDownList14.SelectedValue * 2) + (DropDownList15.SelectedValue * 2)) / tot1
        TextBox1.Text = sem1

    End Sub

推荐答案

在您的web.config中设置customerror mode = off并让我们看到错误.
set customerror mode = off in your web.config and let us see the error.


这篇关于多个用户访问相同的变量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆