|
I can't see anything in that code which would bind data to the GridView. There's no DataSourceID or SelectMethod on the GridView, and nothing in the code that sets the DataSource .
There's also no sign of the txtEmpID control, and the CType((CType(sender, TextBox)).Parent.Parent.Parent.Parent, GridViewRow) looks suspicious to me.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Hi Richard,
Always great to hear from you.
Thank you for the feedback.
I tried this code:
Private Sub fillSourceRecords()
Dim conn_str As String = ConfigurationManager.ConnectionStrings("constr").ConnectionString
Using con As SqlConnection = New SqlConnection(conn_str)
Using sourcecmd As SqlCommand = New SqlCommand()
sourcecmd.CommandText = "uspGetEthicsRecs"
sourcecmd.CommandType = CommandType.StoredProcedure
sourcecmd.Parameters.AddWithValue("@empID", txtEmpID.Text.Trim())
sourcecmd.Connection = con
Using sda As SqlDataAdapter = New SqlDataAdapter(sourcecmd)
Dim dt As DataTable = New DataTable()
sda.Fill(dt)
Gridview1.DataSource = dt
Gridview1.DataBind()
End Using
End Using
End Using
End Sub
And then on the ValidateEmp sub, I would call this routine as:
fillSourceRecords()
The problem with this code is that even though it displays data on the gridview.
However, when I enter another empID, it doesn't replace the original data with the data that is associated with the current empID.
This is one of those applications that uses gridview to add dynamic rows as needed.
It is a lot of code and very complicated. It took almost six months to get it to work with some of the help coming from you.
If you would like to see the rest of code, please let me know as the solution that I am looking for may be hidden in one of the codes but I am not able to figure it out.
|
|
|
|
|
samflex wrote: However, when I enter another empID, it doesn't replace the original data with the data that is associated with the current empID.
That method should replace the contents of the grid with the loaded data. Are you sure the method is being called?
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Yes, sir.
I removed it from the code I posted here yesterday.
Sorry to post the code again but this is how I was calling it:
Protected Sub txtEmpID_TextChanged(sender As Object, e As EventArgs) Handles txtEmpID.TextChanged
If Not String.IsNullOrEmpty(txtEmpID.Text) Then
Dim Conn As SqlConnection
'Read in connection String
Conn = New SqlConnection(ConfigurationManager.ConnectionStrings("constr").ConnectionString)
Conn.Open()
Dim cmd As New SqlCommand("ValidateEmpID", Conn)
cmd.CommandType = CommandType.StoredProcedure
cmd.Parameters.AddWithValue("@empID", txtEmpID.Text)
Dim dr As SqlDataReader = cmd.ExecuteReader()
If dr.HasRows Then
'Employee exists'
dr.Read()
checkusername.Visible = True
dprocessed.Visible = True
If dr("previousYear").ToString() = "1" Then
imgstatus.ImageUrl = "images/NotAvailable.jpg"
lblStatus.Text = "Please verify your information for accuracy. Then complete rest of the form."
lblStatus.ForeColor = System.Drawing.Color.Red
System.Threading.Thread.Sleep(300)
txteName.Text = dr("employeeName").ToString()
txttitle.Text = dr("empTitle").ToString()
txtemail.Text = dr("email").ToString()
txtEmpID.Text = dr("empID").ToString()
fillSourceRecords() <--
'Dim currentRow As GridViewRow = CType((CType(sender, TextBox)).Parent.Parent.Parent.Parent, GridViewRow)
' Dim txtsource As TextBox = CType(currentRow.FindControl("txtsourcename"), TextBox)
'txtsource.Text = dr("sourcename").ToString()
' Dim txtsource As TextBox = CType(currentRow.FindControl("txtspousename"), TextBox)
' txtspouse.Text = dr("spousename").ToString()
ElseIf dr("thisYear").ToString() = "1" Then
imgstatus.ImageUrl = "images/NotAvailable.jpg"
lblStatus.Text = "You have already completed this Disclosure form. Please close the form. If you feel there is a mistake, please contact Clerk at xxx-xxx-xxxx"
lblStatus.ForeColor = System.Drawing.Color.Red
System.Threading.Thread.Sleep(300)
txteName.Text = dr("employeeName").ToString()
txttitle.Text = dr("empTitle").ToString()
txtemail.Text = dr("email").ToString()
txtEmpID.Text = dr("empID").ToString()
txteName.Enabled = False
txttitle.Enabled = False
txtemail.Enabled = False
txtEmpID.Enabled = False
GridPanels.Enabled = False
dprocessed.Visible = True
btnNext.Enabled = False
Else
'not this year, nor the previous year'
End If
Else
checkusername.Visible = True
dprocessed.Visible = True
imgstatus.ImageUrl = "images/Icon_Available.gif"
lblStatus.Text = "Proceed to complete entire form"
lblStatus.ForeColor = System.Drawing.Color.Red
System.Threading.Thread.Sleep(300)
txteName.Text = ""
txttitle.Text = ""
txtemail.Text = ""
End If
Else
checkusername.Visible = False
End If
End Sub
Notice that I commented out txtsource and txtspouse.
The point that is worth mentioning which was a problem is that when I enter empID to valid, even the it displays contents of the grid from the DB, the information display on the code below stays the same. It doesn't change to show that the employee, employee's title and email from code below is the same as the contents of the grid even they are all validated using the txtEmpID_TexChanged(...) method:
<div class="table-responsive">
<table class="table">
<tr>
<td>
<div class="form-group">
<label for="lblEname"><span style="font-weight:bold;font-size:16px;color:#000000;">Employee Name</span><span style="color:#ff0000">*</span></label>
<asp:TextBox ID="txteName" placeholder="Employee name..." style="width:200px;" class="form-control" runat="server"></asp:TextBox>
<asp:RequiredFieldValidator id="RequiredFieldValidator2" Font-Bold="true"
SetFocusOnError="true" runat="server"
ErrorMessage="*" ControlToValidate="txteName" /><br />
</div>
</td>
<td>
<div class="form-group">
<label id="lblTitle"><span style="font-weight:bold;font-size:16px;color:#000000;">Your title</span><span style="color:#ff0000">*</span></label>
<asp:TextBox ID="txttitle" placeholder="Employee title..." style="width:200px;" class="form-control" runat="server"></asp:TextBox>
<asp:RequiredFieldValidator id="RequiredFieldValidator3" Font-Bold="true"
SetFocusOnError="true" runat="server"
ErrorMessage="*" ControlToValidate="txttitle" />
</div>
</td>
<td>
<div class="form-group">
<label id="lblEmail"><span style="font-weight:bold;font-size:16px;color:#000000;">Your email address</span><span style="color:#ff0000">*</span></label>
<asp:TextBox ID="txtemail" placeholder="Employee email..." style="width:200px;" class="form-control" runat="server"></asp:TextBox>
<asp:RequiredFieldValidator id="RequiredFieldValidator4" Font-Bold="true"
SetFocusOnError="true" runat="server"
ErrorMessage="*" ControlToValidate="txtemail" />
</div>
</td>
</tr>
</table>
</div>
modified 30-Jan-20 11:27am.
|
|
|
|
|
You're only calling the fillSourceRecords method if the first row returned from the ValidateEmpID procedure was created last year.
I suspect you might have the previousYear / currentYear test the wrong way round - it doesn't make sense to me that you'd be able to edit last year's records, but not this year's records. But I don't know your requirements, so perhaps that's correct?
It looks like your ValidateEmpID procedure could return multiple rows, but you're only processing one row here. Again, that seems odd to me.
It looks like you want to clear the controls in all cases where the procedure doesn't return a row for either this year or the previous year. I'd be inclined to do that before executing the query; otherwise, you'll need to repeat the code in every Else block.
You'll probably want to remove the Thread.Sleep calls too, unless you're looking for an easy way to speed up the code in a future update.
I think something like this would possibly be easier to follow (assuming I've not missed something):
Protected Sub txtEmpID_TextChanged(sender As Object, e As EventArgs) Handles txtEmpID.TextChanged
If String.IsNullOrEmpty(txtEmpID.Text) Then
checkusername.Visible = False
Return
End If
txteName.Text = String.Empty
txttitle.Text = String.Empty
txtemail.Text = String.Empty
lblStatus.Text = String.Empty
Gridview1.DataSource = Nothing
Gridview1.DataBind()
checkusername.Visible = True
dprocessed.Visible = True
lblStatus.ForeColor = System.Drawing.Color.Red
Using Conn As New SqlConnection(ConfigurationManager.ConnectionStrings("constr").ConnectionString)
Using cmd As New SqlCommand("ValidateEmpID", Conn)
cmd.CommandType = CommandType.StoredProcedure
cmd.Parameters.AddWithValue("@empID", txtEmpID.Text)
Conn.Open()
Using dr As SqlDataReader = cmd.ExecuteReader(CommandBehavior.CloseConnection)
If Not dr.Read() Then
imgstatus.ImageUrl = "images/Icon_Available.gif"
lblStatus.Text = "Proceed to complete entire form"
txteName.Enabled = True
txttitle.Enabled = True
txtemail.Enabled = True
txtEmpID.Enabled = True
GridPanels.Enabled = True
btnNext.Enabled = True
Return
End If
imgstatus.ImageUrl = "images/NotAvailable.jpg"
txteName.Text = dr("employeeName").ToString()
txttitle.Text = dr("empTitle").ToString()
txtemail.Text = dr("email").ToString()
txtEmpID.Text = dr("empID").ToString()
If dr("previousYear").ToString() = "1" Then
lblStatus.Text = "Please verify your information for accuracy. Then complete rest of the form."
txteName.Enabled = True
txttitle.Enabled = True
txtemail.Enabled = True
txtEmpID.Enabled = True
GridPanels.Enabled = True
btnNext.Enabled = True
fillSourceRecords()
Else If dr("thisYear").ToString() = "1" Then
lblStatus.Text = "You have already completed this Disclosure form. Please close the form. If you feel there is a mistake, please contact Clerk to the CEO and BOC at 404-371-3224"
txteName.Enabled = False
txttitle.Enabled = False
txtemail.Enabled = False
txtEmpID.Enabled = False
GridPanels.Enabled = False
btnNext.Enabled = False
Else
txteName.Enabled = False
txttitle.Enabled = False
txtemail.Enabled = False
txtEmpID.Enabled = False
GridPanels.Enabled = False
btnNext.Enabled = False
End If
End Using
End Using
End Using
End Sub
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
modified 30-Jan-20 13:09pm.
|
|
|
|
|
Thank you so much sir.
You are so very generous.
Just one clarification sir.
The requirement that I was given is that every year, employees will need to complete this form.
If this is the first time, they are completing it, then obviously nothing to edit.
The grid is blank so they can enter their information.
If however, they had completed this form the previous year, then they don't need to complete the form all over again.
The information they had already entered the previous year should load the gridview and they would either keep them if nothing changed from previous year or edit the contents to make them current for the current year.
I hope this explains why only the previous year (not the years past or current year) needs to be loaded so they can edit them if necessary.
I am about to test your solution now sir.
Many, many thanks for your kindness.
|
|
|
|
|
I have a little problem sir.
Normally, when empID is validated, it gives the employee a message either that his/her needs to verify his/her information for accuracy. Then complete rest of the form. This means the employee had completed the form the previous year and his/her information is populated into the gridview.
If the user just completed the form this year, s/he gets a message that s/he has already completed this Disclosure form. Please close the form. If you feel there is a mistake, please the office in charge of the form.
Or the user is asked to proceed to complete the form if it is the first time s/he is completing the form.
In this case, after testing your solution, the message is not displaying and none of the boxes is getting populated.
I had created a screenshot but unfortunately, there is no way (that I know of) to post it here.
|
|
|
|
|
There should only be two cases where the status label doesn't have a message:
- The
txtEmpID control is empty; - The stored procedure returned a row which was neither for this year nor the previous year;
You'll need to debug the code to see which is happening. Perhaps add a different message in the final Else ' Not this year, nor the previous year block.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
If I temporarily comment this out:
' Clear the controls:
'txteName.Text = String.Empty
'txttitle.Text = String.Empty
'txtemail.Text = String.Empty
'txtEmpID.Text = String.Empty
'lblStatus.Text = String.Empty
'Gridview1.DataSource = Nothing
'Gridview1.DataBind()
it works but doesn't work if they are not commented out if I am using the correct empID with previous year's date and doesn't show the message: Not this year, nor the previous year even though I added that message to the Else block.
|
|
|
|
|
I suspect you just need to comment out the line:
txtEmpID.Text = String.Empty since that control is used further down to populate the parameter for the query.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Thanks as always for your help.
I really, really appreciated it.
It is working real well now.
|
|
|
|
|
Hi, I am new to the OData World - I am researching, I have been given a task to connect to OData Services they have, they are exposing their Data through OData - that's what I understood, based upon that I have to write an ASP.Net client application, they have given URLs to connect to their OData Services, now I want to understand couple of things before I start writing my client app.
1. What's the use of exposing Data as OData over other web/rest services, why do we need it? Are there any security advantages?
2. What are the best ways to connect to OData Service from client like Entity Framework is better or just use .Net C#?
3. What precautions should I take when I am connecting and using a OData Service?
4. Any other suggestions you can give me would be very very appreciated - thanks a lot. I am also researching about it, but if you know something already also would be helpful - thanks again.
|
|
|
|
|
I am trying to apply filters from one dropdown in a datagrid to another dropdown in the same datagrid and same row. The "edit" screen shot is the most important.
The dropdown under "Chamber" will be used to filter the values in the "District" dropdown. Basically, the "Districts" are tied to a "Chamber". I am having a lot of trouble because of the EditItemTemplate sections.
Thank you for the help in advance!
<asp:GridView CssClass="datatable" ShowFooter="false" ShowHeaderWhenEmpty="true" DataKeyNames="ProfileTermID" DataSourceID="ldsTerms" ID="gvTerms" OnDataBound = "OnDataBound" OnRowCommand="gvTerms_RowCommand" runat="server" AutoGenerateColumns="False">
<HeaderStyle BackColor="#999999" ForeColor="#ffffff" />
<RowStyle CssClass="divRow" />
<EditRowStyle BackColor="#b3d4e8" Height="50px" VerticalAlign="Middle" HorizontalAlign="Center" />
<FooterStyle BackColor="#b3d4e8" Height="50px" VerticalAlign="Middle" HorizontalAlign="Center" />
<EmptyDataTemplate>
Legislator Has No Terms
</EmptyDataTemplate>
<Columns>
<asp:BoundField DataField="ProfileID" HeaderText="ProfileID" />
<asp:TemplateField HeaderText="Term Start Date" ItemStyle-CssClass="divCell">
<EditItemTemplate>
<telerik:RadDatePicker ID="rdtTermStart" Skin="Metro" runat="server" SelectedDate='<%#Eval("TermStartDate")%>'>
</telerik:RadDatePicker>
</EditItemTemplate>
<ItemTemplate>
<%#Eval("TermStartDate", "{0:d}")%>
</ItemTemplate>
<FooterTemplate>
<telerik:RadDatePicker ID="rdtTermStartF" Skin="Metro" runat="server">
</telerik:RadDatePicker>
</FooterTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="TermEndDate" ItemStyle-CssClass="divCell">
<EditItemTemplate>
<telerik:RadDatePicker ID="rdtTermEnd" Skin="Metro" runat="server" Width="200px" SelectedDate='<%# IIf(IsDBNull(Eval("TermEndDate")), vbNull, Eval("TermEndDate")) %>' />
</EditItemTemplate>
<ItemTemplate>
<%# IIf(IsDBNull(Eval("TermEndDate")), vbNull, Eval("TermEndDate", "{0:d}")) %>
</ItemTemplate>
<FooterTemplate>
<telerik:RadDatePicker ID="rdtTermEndF" Skin="Metro" runat="server">
</telerik:RadDatePicker>
</FooterTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Chamber" ItemStyle-CssClass="divCell">
<EditItemTemplate>
<asp:DropDownList ID="ddChamber" DataSourceID="ldsChambers" DataTextField="Name" DataValueField="ID" runat="server" AutoPostBack="true" OnSelectedIndexChanged="ddChamber_SelectedIndexChanged" SelectedValue='<%# Bind("ChamberID") %>'>
</asp:DropDownList>
</EditItemTemplate>
<ItemTemplate>
<%#Eval("mod_chamber.Name")%>
</ItemTemplate>
<FooterTemplate>
<asp:DropDownList ID="ddChamberF" AutoPostBack="true" OnSelectedIndexChanged="ddChamberF_SelectedIndexChanged" DataSourceID="ldsChambers" DataTextField="Name" DataValueField="ID" runat="server">
</asp:DropDownList>
</FooterTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Party" ItemStyle-CssClass="divCell">
<EditItemTemplate>
<asp:DropDownList ID="ddParty" DataSourceID="ldsParties" DataTextField="Name" DataValueField="ID" runat="server" SelectedValue='<%# Bind("PartyID") %>'>
</asp:DropDownList>
</EditItemTemplate>
<ItemTemplate>
<%#Eval("mod_party.name")%>
</ItemTemplate>
<FooterTemplate>
<asp:DropDownList ID="ddPartyF" DataSourceID="ldsParties" DataTextField="Name" DataValueField="ID" runat="server">
</asp:DropDownList>
</FooterTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="District" ItemStyle-CssClass="divCell">
<EditItemTemplate>
<asp:DropDownList ID="ddDistrict" DataSourceID="ldsDistricts" DataTextField="Name" DataValueField="ID" runat="server">
</asp:DropDownList>
</EditItemTemplate>
<ItemTemplate>
<%#Eval("mod_district.name")%>
</ItemTemplate>
<FooterTemplate>
<asp:DropDownList ID="ddDistrictF" DataTextField="Name" DataValueField="ID" runat="server" >
</asp:DropDownList>
</FooterTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="County" ItemStyle-CssClass="divCell">
<EditItemTemplate>
<asp:DropDownList ID="ddCounty" DataSourceID="ldsCounty" DataTextField="Name" DataValueField="ID" runat="server" SelectedValue='<%# Bind("CountyID") %>'>
</asp:DropDownList>
</EditItemTemplate>
<ItemTemplate>
<%#Eval("mod_county.name")%>
</ItemTemplate>
<FooterTemplate>
<asp:DropDownList ID="ddCountyF" DataSourceID="ldsCounty" DataTextField="Name" DataValueField="ID" runat="server">
</asp:DropDownList>
</FooterTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="" ShowHeader="False" ItemStyle-CssClass="divCell" ItemStyle-Height="34px">
<EditItemTemplate>
<asp:ImageButton ID="ImageButton6" runat="server" CausesValidation="False" CommandName="Update" Text="Update" ToolTip="Update" ImageUrl="/admin/images/success.png" />
</EditItemTemplate>
<FooterTemplate>
<asp:ImageButton ID="ImageButton3" runat="server" CausesValidation="False" CommandName="Insert" ToolTip="Insert" Text="Insert" ImageUrl="/admin/images/success.png" />
</FooterTemplate>
<ItemTemplate>
<asp:ImageButton ID="ImageButton1" runat="server" CausesValidation="False" CommandName="Edit" Text="Edit" ImageUrl="/admin/images/ico_edit_a.png" />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="" ShowHeader="False" ItemStyle-CssClass="divCell" ItemStyle-Height="34px">
<ItemTemplate>
<asp:ImageButton ID="ImageButton2" runat="server" CausesValidation="False" CommandName="Delete" Text="Delete" ImageUrl="/admin/images/ico_delete_a.png" />
</ItemTemplate>
<EditItemTemplate>
<asp:ImageButton ID="ImageButton3" runat="server" CausesValidation="False" CommandName="Cancel" Text="Cancel" ImageUrl="/admin/images/ico_subtract.png" />
</EditItemTemplate>
<FooterTemplate>
<asp:ImageButton ID="ImageButton7" runat="server" CausesValidation="False" CommandName="Cancel_New" Text="Cancel" ImageUrl="/admin/images/ico_subtract.png" />
</FooterTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</div >
</div>
<asp:LinqDataSource ID="LinqDataSource1" runat="server" ContextTypeName="CMSmodules.modulesDataContext"
TableName="mod_Profiles" EnableDelete="True">
</asp:LinqDataSource>
<asp:LinqDataSource ID="LinqDataSource2" runat="server" ContextTypeName="CMSmodules.modulesDataContext"
EnableInsert="True" EnableUpdate="True" TableName="mod_Profiles" Where="ID == @ID">
<WhereParameters>
<asp:ControlParameter ControlID="lvContent" DefaultValue="0" Name="ID" PropertyName="SelectedValue"
Type="Int32" />
</WhereParameters>
</asp:LinqDataSource>
<asp:LinqDataSource ID="ldsTerms" runat="server" ContextTypeName="CMSmodules.ModulesDataContext" EntityTypeName="" TableName="mod_ProfileTerms" EnableDelete="True" EnableInsert="True" EnableUpdate="True">
</asp:LinqDataSource>
<asp:LinqDataSource ID="ldsDistricts" runat="server" ContextTypeName="CMSmodules.modulesDataContext"
TableName="mod_Districts" OrderBy="Name" Select="new (ID, Name)">
</asp:LinqDataSource>
<asp:LinqDataSource ID="ldsParties" runat="server" ContextTypeName="CMSmodules.modulesDataContext"
TableName="mod_Parties" OrderBy="Name" Select="new (ID, Name)">
</asp:LinqDataSource>
<asp:LinqDataSource ID="ldsChambers" runat="server" ContextTypeName="CMSmodules.modulesDataContext"
TableName="mod_Chambers" OrderBy="Name" Select="new (ID, Name)">
</asp:LinqDataSource>
<asp:LinqDataSource ID="ldsCounty" runat="server" ContextTypeName="CMSmodules.modulesDataContext"
TableName="mod_Counties" OrderBy="Name" Select="new (ID, Name)">
</asp:LinqDataSource>
<asp:LinqDataSource ID="ldsSessions" runat="server" ContextTypeName="CMSmodules.modulesDataContext"
TableName="mod_Sessions" OrderBy="Name" Select="new (ID, Name)">
</asp:LinqDataSource>
|
|
|
|
|
I have a web application based in aspnet 4.5 that is running on a Windows 2016 Server with IIS 10. The app allows to client the downloading of several documents (img, pdf, zip files). All works correctly from several years but starting from 4 weeks to now ios based client (ipad and iphone running 13.3 ios) receive corrupted files. Looking at the logs I have seen that the client closes the connection abnormaly.
this is the code snippets i use to send files:
Response.Clear();
System.IO.FileInfo fInfo = new System.IO.FileInfo(allegatizipfilename);
Response.AddHeader("Content-Length", fInfo.Length.ToString());
Response.AddHeader("Content-disposition", "attachment; filename=allegati.zip");
Response.ContentType = "application/octet-stream";
Response.TransmitFile(allegatizipfilename);
Response.Flush();
Response.End();
I have tried to disable http2, to allow longer connection time, to reduce the minimal connection speed all with no results.
What is strange to me is the fact that anything worked fine till some week ago and nothing was changed in the server configuration nor the software code.
Anyone has the same issue ?
|
|
|
|
|
If it's presented as a standard download it might well be a header or CORS issue.
If it's an async download, the error likely lies in the javascript running in the browser.
Determine the download method, check the crapple browser API, and play "spot the difference".
"Never attribute to malice that which can be explained by stupidity."
- Hanlon's Razor
|
|
|
|
|
Thanks for your reply,
I will investigate over the things you suggest
But the very strange thing is that the same server configuration worked up to 4 weeks ago and everything is working well in Android or windows
Also we tried several browser as an alternative to Safari, all getting the same results... Is there in your opinion a chance of a bug in ios?
|
|
|
|
|
A lot of configurations, such as what encryption standards are acceptable, can be configured at the OS level; it's possible that they locked it down further. The odds of that serious a bug in something as well traversed as the network stack are unlikely.
Can you get wireshark on a client and see what's happening? That would allow you to troubleshoot the TLS handshake, and the overall traffic flow in general.
"Never attribute to malice that which can be explained by stupidity."
- Hanlon's Razor
|
|
|
|
|
It was simpler: ios Doesn't accepts octet-streams mime type...
|
|
|
|
|
Ah, ignoring the standard. There's a shock.
"Never attribute to malice that which can be explained by stupidity."
- Hanlon's Razor
|
|
|
|
|
Hi,
Breaking my head, over this error, for which the reason according to all google results I have been able to find, is usually a simple omission of SelectCommandType="StoredProcedure", or some simple typo.
If this is the case for me, I am just not seeing it.
<asp:ListView ID="ListViewOrderRow"
runat="server"
DataKeyNames="rowguid"
DataSourceID="SqlDataSource1"
OnDataBound="ListViewOrderRow_DataBound">
<asp:Label ID="afp_nrLabel" runat="server" Text='<%# Eval("afp_nr") %>'></asp:Label>
<asp:Label ID="auf_trnrLabel" runat="server" Text='and lots more stuff like this'></asp:Label>
</asp:ListView>
<asp:SqlDataSource ID="SqlDataSource1"
runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionStringFDS %>"
ProviderName="<%$ ConnectionStrings:ConnectionStringFDS.ProviderName %>"
SelectCommand="sp_Warehouse_RowsByOrderNumberAndWarehouse"
SelectCommandType="StoredProcedure">
<SelectParameters>
<asp:QueryStringParameter Direction="Input"
DefaultValue="x"
Name="@OrderNumber"
QueryStringField="afp_nr"
Type="String" />
<asp:QueryStringParameter Direction="Input"
DefaultValue="x"
Name="@Warehouse"
QueryStringField="wh_nr"
Type="String" />
</SelectParameters>
</asp:SqlDataSource>
The address shows that the necessary parameter values are being passed to the page:
"http://address/folder/OrderPicking.aspx?afp_nr=1586474&wh_nr=02"
Any and all help much appreciated.
Regards,
Johan
My advice is free, and you may get what you paid for.
|
|
|
|
|
Try omitting the "@" from the name
<asp:QueryStringParameter Direction="Input"
DefaultValue="x"
Name="OrderNumber"
QueryStringField="afp_nr"
Type="String" />
<asp:QueryStringParameter Direction="Input"
DefaultValue="x"
Name="Warehouse"
QueryStringField="wh_nr"
Type="String" />
|
|
|
|
|
Hi,
Thanks for your reply. I omitted the @ characters, but unfortunately still no sigare.
Regards,
Johan
My advice is free, and you may get what you paid for.
|
|
|
|
|
|
Why this code shows two images instead of one
protected void Page_Load(object sender, EventArgs e)
{
string divs = "<div class=" + "\"vlightbox1\">";
string divend = "</div>";
string anch = divs + "<a class=" + "\"vlightbox1\" " + "href=" + "\"index_files/vlb_images1/img20200127wa0004.jpg\"" + " " + ">"
+ "<img src=" + "\"index_files/vlb_thumbnails1/img20200127wa0004.jpg\"/" + "></a>" + divend;
string fnl = anch;
var imgcontrol2 = new HtmlGenericControl(fnl);
this.Page.Form.FindControl("ContentPlaceHolder2").Controls.Add(imgcontrol2);
}
|
|
|
|
|
I tried finding the solution or lead on how to implement dynamically updating the site with progress bar but on failing I am posting here.
My problem is that, I am fetching data from 4 different sources by hitting them in realtime and every source return data in blocks of results i.e. first 10 then, then again after querying by telling I have pulled previous then it again provide more. I want to show sorted data as and when I am able to fetch (I am able to fetch successfully) i.e. if I am able to receive data from first two sites I need to show them with sort on Alphabet then if again received more from those sites or other one again I should sort till all the results are fetched.
|
|
|
|