set MySqlParameter = -1 if null

Advertisements I am trying to use SQL queries, but I meet a problem with nullable objects : Here is my code where I define all MySql parameters : MySqlParameter[] listParams = new MySqlParameter[] { new MySqlParameter("id", this.ID), new MySqlParameter("idStock", this.idStock), new MySqlParameter("certificate", this.certificate), new MySqlParameter("idLO", this.launchingOrder.ID), new MySqlParameter("idToleOri", this.toleOri.ID), new MySqlParameter("idTolesOri", string.Join("+", this.idTolesOri)), new MySqlParameter("listInstructions",… Read More set MySqlParameter = -1 if null

Select and Convert bytes object from a list

Advertisements I have tried everything in my mind but wasn’t successfull. Can anybody help me to select bytes object from a list bellow? [(‘uid=xxxxxx,o=center’, {‘userCertificate;binary’: [b’0\x82\x07q0\x82\x05Y\xa0\x03\x02\x01\x02\x02\x10`\ …..’]})] This is the result from a openldap search and I want to select the userCertificate part of the entry and convert it to a base64 text. When I… Read More Select and Convert bytes object from a list

How to rename or keep the file name only while downloading the file entering a required key?

Advertisements See my below code. It’s working fine but while downloading a file by entering the required key, the file name changed and it’s downloading with the whole domain name + directory + file name. But I want just the file name. Code : //This is the HTML part. <center> <input class="keyBox" style="padding : 10px;… Read More How to rename or keep the file name only while downloading the file entering a required key?