当前位置:网站首页>How to implicitly pass values when transferring forms
How to implicitly pass values when transferring forms
2022-07-04 16:45:00 【Struggling young man】
When the form is transferred , How to implicitly pass the value .
Case description
- When modifying form elements , When you click the Modify button , Need to send out get request , So that it can be displayed in the form that pops up later ( Good user experience ).
- The request from the foreground to the backend is get request , And pass it to a value id Used to query the corresponding tables in the database ,id For all fields of this value and return to the foreground , The foreground will render the required fields to the page .
- When the user makes modifications in the pop-up box , Then submit the data to the background interface , After the background interface receives the data , Execute database statement , Complete data update .
difficulty
The problem to be solved appears in the second step , That is, data modification , And send the data back to the background . And here comes the question , How does the database know which data you want to modify ? Your pop-up box form What the form submits is only the modified value , Not given id ah .
This is the time , In the first step , We have found all the attributes in the data , Why not send a message id Well ?
what ? You said you didn't want users to modify id( Primary key )? Oh , It's easy to do . We can add another label to the form , And the value is preset , That is, you need to modify the database corresponding to that data id( Primary key ), But we don't show it to users , We hide it . Ah , Just play !
When submitting data at this time , There is id( Primary key ) 了 , Problem solving .
Here is a solution for you , If there is a better way , Welcome to leave a message .
边栏推荐
- China tall oil fatty acid market trend report, technical dynamic innovation and market forecast
- L1-072 scratch lottery
- Vscode setting outline shortcut keys to improve efficiency
- Accounting regulations and professional ethics [9]
- 散列表
- AutoCAD - set color
- Hidden communication tunnel technology: intranet penetration tool NPS
- 对人胜率84%,DeepMind AI首次在西洋陆军棋中达到人类专家水平
- Ten clothing stores have nine losses. A little change will make you buy every day
- Will the memory of ParticleSystem be affected by maxparticles
猜你喜欢
![[hcie TAC] question 5 - 1](/img/e0/1b546de7628695ebed422ae57942e4.jpg)
[hcie TAC] question 5 - 1

overflow:auto与felx结合的用法

从数数开始

《吐血整理》保姆级系列教程-玩转Fiddler抓包教程(2)-初识Fiddler让你理性认识一下

NoSQL之readis配置与优化(终章)

How to decrypt worksheet protection password in Excel file

Understand Alibaba cloud's secret weapon "dragon architecture" in the article "science popularization talent"

I let the database lock the table! Almost fired!

Preliminary practice of niuke.com (10)
![[North Asia data recovery] a database data recovery case where the partition where the database is located is unrecognized due to the RAID disk failure of HP DL380 server](/img/21/513042008483cf21fc66729ae1d41f.jpg)
[North Asia data recovery] a database data recovery case where the partition where the database is located is unrecognized due to the RAID disk failure of HP DL380 server
随机推荐
FIREBIRD使用经验总结
Model fusion -- stacking principle and Implementation
[Previous line repeated 995 more times]RecursionError: maximum recursion depth exceeded
~89 deformation translation
Talking about Net core how to use efcore to inject multiple instances of a context annotation type for connecting to the master-slave database
What should ABAP do when it calls a third-party API and encounters garbled code?
多年锤炼,迈向Kata 3.0 !走进开箱即用的安全容器体验之旅| 龙蜥技术
NoSQL之readis配置与优化(终章)
[North Asia data recovery] a database data recovery case where the partition where the database is located is unrecognized due to the RAID disk failure of HP DL380 server
Market trend report, technical innovation and market forecast of China's hair repair therapeutic apparatus
最大子数组与矩阵乘法
DIY a low-cost multi-functional dot matrix clock!
程序员怎么才能提高代码编写速度?
时序图数据建模与产业链分析
.Net 应用考虑x64生成
基于check-point机制的任务状态回滚和数据分块任务
QT graphical view frame: element movement
实战:fabric 用户证书吊销操作流程
Ten clothing stores have nine losses. A little change will make you buy every day
How to decrypt worksheet protection password in Excel file