数据存储问题。 [英] data storing problem.

查看:82
本文介绍了数据存储问题。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在做与工作相关的网站现在我创建了一个工作角色类别下拉列表列表正在通过jquery工作,当我在第一个下拉列表中选择功能区域如... IT软件时,特定角色显示在第二个下拉列表中。 />


例如下拉1:IT-软件



下拉列表2:软件开发人员,设计师等



第二个选项代码在下面给出..选项是在jquery中创建的,因为你只能显示选择选项。



i want store第二个选项文本进入sql server



 <  选择    class   =  textbox3    type   =  text    id   =  drd_Preferred_Level    runat   =  server    onchange   =  hi_level(this); >  
< 选项 > ; -------------------------------选择------------- --------------------- < / option >


< / select >

解决方案

hai,每个功能区域只有一个角色,这些是静态的,它会改变(即硬编码或反向数据形式数据库并绑定两个下拉框)如果它在代码后面硬编码,请尝试下拉选择的索引更改为冷杉下拉列表。



喜欢



如果selectedindex = 0那么

dropdown2.selected.text =第一个角色

elseif selectedindex = 1则

dropdown2.selected.text =第二个角色

elseif ........







问候

Aravindb


所以你要做的是,你创建一个AJAX处理程序,或者回发,你编写代码来存储值你的数据库。你需要在寻求帮助之前尝试这个,我们实际上不能给你一个复制和粘贴解决方案,我们不知道你的数据库结构,如果你正在使用EF,如果你正在使用存储过程等。

I am doing job related website now am created a job role category dropdown list the list is working through jquery and when i select functional area like..IT software in first dropdown the particular role is display on second dropdownlist..

eg dropdown 1 : IT- Software

dropdown 2 : Software developer,Designer etc

second option code is given below..options are created in jquery thats y u can show select option only.

i wanted store the second option text into sql server

<select class="textbox3" type="text" id="drd_Preferred_Level" runat="server" onchange="hi_level(this);">
<option>-------------------------------Select----------------------------------</option>


</select>

解决方案

hai ,u have only one role for each Functional area,and these are static one,it change(i.e hard coded or retrive data form database and bind both dropdown box).if it hard coded in code behind ,try dropdown selected index changed for firs dropdownlist.

like

if selectedindex=0 then
dropdown2.selected.text="First role"
elseif selectedindex=1 then
dropdown2.selected.text="Second role"
elseif........



Regards
Aravindb


So what you do is, you create an AJAX handler, or a postback, and you write code to store the value in your database. You need to actually try this before asking for help, we actually can't give you a copy and paste solution, we don't know your database structure, if you're using EF, if you're using stored procs, etc.


这篇关于数据存储问题。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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