|
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.
|
|
|
|
|
What exactly are you asking us to do?
Social Media - A platform that makes it easier for the crazies to find each other.
Everyone is born right handed. Only the strongest overcome it.
Fight for left-handed rights and hand equality.
|
|
|
|
|
To dynamically put the lowest rate data on top while my website is fetching the data from different sources and also to show the progresss bar.
|
|
|
|
|
That is a lot of different things and a lot of different code. I don’t think anyone is going to write that code for you, so where exactly are you stuck?
Social Media - A platform that makes it easier for the crazies to find each other.
Everyone is born right handed. Only the strongest overcome it.
Fight for left-handed rights and hand equality.
|
|
|
|
|
You may want to think of building a WebService which executes in the background and one of the methods on that WebService is to return the progress of fetching data.
Kind of a "BlueSky" answer, but building WebSites fetching lots of data which takes a long time can be quite a challenge.
|
|
|
|
|
When I run my code, when I want to check the user who is logged in (this is a web application), the method called is having an error saying The method or operation is not implemented.
I need help to fix it by implementing the method.
Here is where the error occurs
try
{
foreach (string caseNumber in userEnteredCaseNumberList)
{
EditCandidateCaseModel newCandidate = new EditCandidateCaseModel();
newCandidate.CaseNbr = caseNumber;
newCandidate.RequestorInfoID = Convert.ToInt32(requestorItem.Value);
newCandidate.EntryStaffUserName = Helpers.Authentication.GetADEmail();
await CandidateCaseController.PostCandidate(newCandidate);
}
}
catch (Exception ex)
{
string errorMsg = string.Format("An error has occured in {0}. \nException:\n{1}", "GetCasesButton_Click()", ex.Message);
ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('" + errorMsg + "');", true);
}
Method that is called by line 8 with EntryStaffUserName. The error on on this method on line 7
public static string GetADEmail()
{
string retVal = string.Empty;
using (var context = new PrincipalContext(ContextType, "COURTS"))
{
UserPrincipal user = new UserPrincipal(context);
user = UserPrincipal.FindByIdentity(context, IdentityType, Environment.UserName);
retVal = user.EmailAddress;
}
return retVal;
}
|
|
|
|
|
Check the UserPrincipal.FindByIdentity functions if it has the following code in it:
throw new NotImplementedException();
|
|
|
|
|
I want to use FCKeditorV2 (Figure 2) http://www.mediafire.com/view/pdmvi0aezyqpil5/website2010_10b.jpg/file
instead of FreeTextBox (Figure 1) http://www.mediafire.com/view/oahtm7k3883elow/website2010_10a.jpg/file
The code I have edited
In file ArticleAddEdit.aspx
line 5:
original
H311457671H
edit
H1922776762H
line 79:
original:
<FTB:FreeTextBox id="txtBody"
TabIndex="3"
toolbarlayout="FontFacesMenu,FontSizesMenu,FontForeColorsMenu,FontForeColorPicker,FontBackColorsMenu,FontBackColorPicker|Bold,Italic,Underline,Strikethrough,RemoveFormat|JustifyLeft,JustifyRight,JustifyCenter,JustifyFull;BulletedList,NumberedList,Indent,Outdent;CreateLink,Unlink|InsertTable,EditTable,InsertImageFromGallery"
runat="Server"
Width="585px" Height="200px"
/>
edit:
<FCKeditorV2:FCKeditor id="txtBody" ToolbarSet="MyToolbar" Width="600" Height="300" BasePath="~/FCKeditor/" runat="server" />
But when I change the code the following error message: http://www.mediafire.com/view/zpze8g7k7o3wm4a/website2010_10c.jpg/file
Line 40: txtTitle.Text = obj.Title;
Line 41: txtExcerpt.Text = obj.Excerpt;
Line 42: txtBody.Text = obj.Body;
Line 43: if (obj.Priority == 1)
Line 44: chkPriority.Checked = true;
For the original code
In file In file ArticleAddEdit.aspx
H725001498H
<asp:Content ID="Content1" ContentPlaceHolderID="PageContent" Runat="Server">
<uc:Title runat="server" ResourceKey='' Text='cập nhật bài việt' />
<table width="595" border="0" align="center" cellpadding="0" cellspacing="0">
<tr style="padding-top:5pt;">
<td colspan="2" align="center">
<asp:Label runat="server" ID="lblMsg" Font-Bold="true" ForeColor="blue"></asp:Label>
</td>
</tr>
<tr>
<td width="75%" >
<asp:ValidationSummary runat="server" ID="valChangePasswordSummary" ShowMessageBox="true" ShowSummary="false" />
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td><%=ResourceManager.GetString("ArticleCategory") %>:</td>
</tr>
<tr>
<td style="padding-top:3pt;">
<webapp4U:ddlArticleCategory ID="dlArticleCategory" runat="server" CssClass="Textbox" />
<asp:RangeValidator runat="server" ControlToValidate="dlArticleCategory" ID="rvl1"
Type="Integer" MinimumValue="2" MaximumValue="1000" Display="dynamic"
ErrorMessage="Category not null" />
</td>
</tr>
<tr>
<td style="padding-top:10pt;"><%=ResourceManager.GetString("Title") %>:</td>
</tr>
<tr>
<td style="padding-top:3pt;">
<asp:TextBox ID="txtTitle" TabIndex="1" Font-Bold="true" runat="server" Width="380" MaxLength="500"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" ControlToValidate="txtTitle" runat="server" ErrorMessage="Title not null" Display="None" />
</td>
</tr>
<tr>
<td style="padding-top:10pt;"><%=ResourceManager.GetString("Article_Trichdan") %>:</td>
</tr>
<tr style="padding-top:3pt;">
<td>
<asp:TextBox ID="txtExcerpt" TabIndex="2" TextMode="MultiLine" Rows="5" runat="server" Width="380" MaxLength="3000"></asp:TextBox>
</td>
</tr>
</table>
</td>
<td valign="top" width="90" style="padding-top:20pt;">
<table border="0" cellpadding="0" width="90" >
<tr>
<td style="padding-top:5pt;" height="90" width="100%" valign="top" align="center">
<img name="ImageItem" id="ImageItem" runat="server" border="1" src="~/WebMaster/Images/Picture.jpg" width="80"/>
<input type="hidden" runat="server" id="HiddenImageName" name="HiddenImageName" value="" />
<input type="hidden" runat="server" id="HiddenImageWidth" name="HiddenImageWidth" value="-1" />
<input type="hidden" runat="server" id="HiddenImageHeight" name="HiddenImageHeight" value="-1" />
</td>
</tr>
<tr>
<td>
<input type="button" class="btupload" value=" Upload Picture" onclick='window.open("UploadFile.aspx?ActUpload=article","khunghinh","width=420,height=200,menubar=no,scrollbars=yes")' />
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td><br /></td>
</tr>
<tr style="padding-top:8pt; padding-bottom:3pt;">
<td colspan="2" ><%=ResourceManager.GetString("Article_Body") %> :</td>
</tr>
<tr>
<td colspan="2" style="font-size:0.7em">
<FTB:FreeTextBox id="txtBody"
TabIndex="3"
toolbarlayout="FontFacesMenu,FontSizesMenu,FontForeColorsMenu,FontForeColorPicker,FontBackColorsMenu,FontBackColorPicker|Bold,Italic,Underline,Strikethrough,RemoveFormat|JustifyLeft,JustifyRight,JustifyCenter,JustifyFull;BulletedList,NumberedList,Indent,Outdent;CreateLink,Unlink|InsertTable,EditTable,InsertImageFromGallery"
runat="Server"
Width="585px" Height="200px"
/>
</td>
</tr>
<tr>
<td colspan="2" align="right" style="padding-top:7pt; padding-right:3pt; padding-bottom:20pt;">
<asp:CheckBox runat="server" ID="chkPriority" Text="" TextAlign=Left />
Tin nổi bật(Hiển thị trên cùng)
<asp:Button runat="server" TabIndex="4" ID="btSave" OnClick="btSave_Click" Text=" Save " CssClass="textbox" />
</td>
</tr>
</table>
<br /><br /><br /><br />
</asp:Content>
In file In file ArticleAddEdit.aspx.cs
namespace webapp4U.UI
{
public partial class ArticleAddEdit : System.Web.UI.Page
{
private int ArticleID = -1;
private int CateID = -1;
protected void Page_Load(object sender, EventArgs e)
{
ArticleID = Globals.GetIntFromQueryString("ArticleID");
CateID = Globals.GetIntFromQueryString("CateID");
if (Request.QueryString["Action"] == "Edit")
{
btSave.CommandArgument = "Edit";
btSave.Text = " Update ";
if (!IsPostBack)
{
Load_GetItemByArticleID(ArticleID);
}
}
}
protected void Load_GetItemByArticleID(int ArticleID)
{
webapp4U.BOL.Article obj = webapp4U.BOL.Article.GetArticleByArticleID(ArticleID);
txtTitle.Text = obj.Title;
txtExcerpt.Text = obj.Excerpt;
txtBody.Text = obj.Body;
if (obj.Priority == 1)
chkPriority.Checked = true;
if(obj.ImageURL.Length>3)
ImageItem.Src = Globals.ApplicationPath + "/UserUpload/Articles/" + obj.ImageURL;
if (obj.ImageWidth > obj.ImageHeight)
ImageItem.Width = 80;
else
ImageItem.Height = 80;
dlArticleCategory.SelectedValue = obj.ArticleCateID.ToString();
HiddenImageName.Value = obj.ImageURL;
HiddenImageWidth.Value = obj.ImageWidth.ToString();
HiddenImageHeight.Value = obj.ImageHeight.ToString();
}
protected void btSave_Click(object sender, EventArgs e)
{
webapp4U.BOL.Article obj = new webapp4U.BOL.Article();
obj.ArticleID = ArticleID;
obj.Title = txtTitle.Text.Trim();
obj.Excerpt = txtExcerpt.Text.Trim().Replace(Environment.NewLine, "<br>");
obj.Body = txtBody.Text;
obj.PostDate = DateTime.Now;
obj.Priority = 0;
if (chkPriority.Checked)
obj.Priority = 1;
obj.ImageURL = HiddenImageName.Value.Trim();
obj.ImageWidth = Convert.ToInt32(HiddenImageWidth.Value.Trim());
obj.ImageHeight = Convert.ToInt32(HiddenImageHeight.Value.Trim());
obj.Authors = " ";
obj.ArticleCateID = Globals.ConvertToInt32(dlArticleCategory.SelectedItem.Value);
if (btSave.CommandArgument == "Edit")
{
obj.TotalViews = 0;
webapp4U.BOL.Article.Update(obj);
}
else
{
webapp4U.BOL.Article.Insert(obj);
}
Response.Redirect("Default.aspx?CateID=" + CateID);
lblMsg.Text = "Cập nhật thông tin thành công!";
}
}
}
or see the attached file: http://www.mediafire.com/file/pzydjnj8zp7jd41/website2010_10.rar/file
Reference links
https://expressmagazine.net/development/1558/huong-dan-dua-fck-editor-vao-web-aspnet
https://docs-old.ckeditor.com/FCKeditor_2.x/Developers_Guide/Integration/ASP.NET
modified 15-Jan-20 2:54am.
|
|
|
|
|
FCKeditor hasn't been updated since 2007. Whilst it might work, there's a good chance there will be problems using it in newer browsers. And if you do encounter any problems, you won't get any support or bug fixes.
You'll probably have better luck using the replacement, CKeditor. You'll just need to be aware of the licensing restrictions for the free version.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
That was a common error with FCKeditor, getting the text from the JavaScript object.
You will have the same issue with CKeditor as well, because it uses the same code to place and grab text from the ckeditor object. I remember having to link some Javascript to transfer the text, and check for ckinstance and ckdirty before accessing the ckobject.
From your post, I can tell your pretty new to CKeditor and haven't gotten to using js files to program the environment yet, or didn't run the sample project provided for you to learn from that is fully functional.
I suggest you run the tutorial project in ckeditor.
If it ain't broke don't fix it
Discover my world at jkirkerx.com
|
|
|
|
|
I did my own research, tinkering and programming, according to you in addition to FCKeditor and CKeditor, currently the programming tool supports better than CKeditor what tool do you use ?
|
|
|
|
|
I'm not sure what you mean by tool.
I used both, starting with FCKEditor and then CKEditor in a Asp.Net Webform app.
I got as far as writing JS files to program the editor, JS scripts to load the HTML, get the HTML back, and wrote
Custom tools or controls to ...
Upload new images,
Set images from the Product database
Place images and text,
Load custom HtmlTemplates to showcase products
Load custom HTML sections
I got pretty good with CKEditor and customers liked it. But I haven't touched it in 3 years, I dropped Webforms and went Angular now.
I think this is what your looking for. It took me a long time to understand how to save the HTML in the editor without reloading the form, and saving when posting the entire form back to the server. It's JQuery, that can write to input elements on the webform. This file calls functions in the main ckEditor JS file. I don't remember all the details to CKEditor, but I needed a JavaScript interface to write the HTML in the content container to a textbox or input form element, since the ckEditor container is not a form element.
So you create a form element that represents the CKEditor HTML content data, and create sort of a hook to go back and forth to ckEditor object, and a panel/container to hold the CKEditor JavaScript object inside.
The function is tied to a webform button OnClientClick(update_ckEditor_Preview())
function update_ckEditor_Preview() {
var ckEditor_XHTML, ckEditor_Instance, ckEditor_Update, classic_template;
classic_template = $('[id*="_txt_ProductEditor_Template"]').val();
try {
var ckInstance = ckEditor_GetInstance();
if (ckInstance !== null) {
var ckDirty = ckInstance.checkDirty;
ckEditor_XHTML = ckInstance.getData();
ckEditor_Instance = ckInstance.getData();
if (ckDirty) {
ckInstance.resetDirty();
}
$('[id*="_panel_Display_Classic_XHTML"]').empty();
$('[id*="_panel_Display_Classic_XHTML"]').append(ckEditor_XHTML);
$('[id*="_panel_Display_Classic_XHTML"]').css('display', 'inline-block');
ckEditor_Update = true;
}
else {
ckEditor_XHTML = $('[id*="_ck_Editor_ProductXHTML"]').val();
$('[id*="_panel_Display_Classic_XHTML"]').empty();
$('[id*="_panel_Display_Classic_XHTML"]').append(ckEditor_XHTML);
$('[id*="_panel_Display_Classic_XHTML"]').css('border', 'solid 1px rgb(28,134,238)');
ckEditor_Update = true;
}
}
catch (err) {
$('[id*="_panel_ProductEditor_Basic_Image_UpdateMessage"]').css('background-color', 'rgb(176,23,31)');
$('[id*="_panel_ProductEditor_Basic_Image_UpdateMessage"]').fadeIn('normal', function () {
$('[id*="_lbl_ProductEditor_Basic_Image_UpdateMessage"]').text("Could not connect to the ckEditor interface, update has failed");
});
}
if (true === ckEditor_Update) {
$('[id*="_panel_ProductEditor_Basic_Image_UpdateMessage"]').css('background-color', 'rgb(28,134,238)');
$('[id*="_lbl_ProductEditor_Basic_Image_UpdateMessage"]').text("Preview Display Page has been updated successfully");
$('[id*="_panel_ProductEditor_Basic_Image_UpdateMessage"]').fadeIn('normal').delay(5000).fadeOut('normal');
}
else {
$('[id*="_panel_ProductEditor_Basic_Image_UpdateMessage"]').css('background-color', 'rgb(176,23,31)');
$('[id*="_lbl_ProductEditor_Basic_Image_UpdateMessage"]').text("Could not connect to the ckEditor interface, update has failed");
$('[id*="_panel_ProductEditor_Basic_Image_UpdateMessage"]').fadeIn('normal').delay(5000).fadeOut('normal');
}
return false;
}
If it ain't broke don't fix it
Discover my world at jkirkerx.com
|
|
|
|
|
|
Well that solves linking a textbox to ckEditor and having to write JavaScript.
I didn't want to download your image.
If it ain't broke don't fix it
Discover my world at jkirkerx.com
|
|
|
|
|
Why have you replied to me instead of the OP?
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Richard Deeming wrote: instead of the OP? Maybe he's not down with OPP?
Social Media - A platform that makes it easier for the crazies to find each other.
Everyone is born right handed. Only the strongest overcome it.
Fight for left-handed rights and hand equality.
|
|
|
|
|
Good question. It wasn't intentional.
Perhaps lack of sleep, woke up at 4:30 and could not go back to sleep, so I went to work.
If it ain't broke don't fix it
Discover my world at jkirkerx.com
|
|
|
|
|
I know how to get it in Startup, but I wrote a class that seeds the database with values, and expanded it to write the product images to wwwroot from the database called SeedDatabase. I just need the wwwroot so I can write the images to the right place.
Guess I figured it out...
Amazing, had no idea this would work, well in development at least.
So I can request services from startup? That's my new question.
private static void SeedDatabase(IWebHost host, Settings appSettings, bool isDocker, string env)
{
using (var scope = host.Services.CreateScope())
{
var services = scope.ServiceProvider;
var logger = services.GetRequiredService<ILogger<Program>>();
var environment = services.GetService<IHostingEnvironment>();
logger.LogInformation("DbAuthConnection=" + appSettings.MongoDB.Connection);
logger.LogInformation("DbAuthContainer=" + appSettings.MongoDB.Container);
logger.LogInformation("Environment=" + env);
try
{
DbInitializer.SeedData(appSettings, environment, isDocker);<br />
logger.LogInformation("Seed DB Succeeded:" + DateTime.Now);
}
catch (Exception ex)
{
logger.LogError(ex, "Seed DB Failed on " + DateTime.Now + ":" + ex.Message);
}
}
}
If it ain't broke don't fix it
Discover my world at jkirkerx.com
|
|
|
|
|
I have been struggling with this problem for some time. What I need to to identify when this is True.
<p
id="noWorkopportunities" class="text-info" style="display:none;">
No available work opportunities found.
/p>
Here is my source and code. Thank You!!
Jim
<div class="panel panel-primary" style="margin-top:10px;">
<div class="panel-heading">
Work Opportunities Available
</div>
<div class="panel-body">
<img id="pw_workopportunities" src="/Images/pleaseWait.gif" alt="Please Wait" style="margin-left:10px" />
<p id="noWorkopportunities" class="text-info" style="display:none;">
No available work opportunities found.
</p>
<table id="workopportunities" style="display:none;" class="table table-bordered">
<tr>
<th>Project Name/Work Order</th>
' Get all tables in the document
Dim tables As HtmlAgilityPack.HtmlNodeCollection = main.DocumentNode.SelectNodes("//table") <b><---- this statements successfully gets all the tables</b>
Dim rows As HtmlAgilityPack.HtmlNodeCollection = main.DocumentNode.SelectNodes("//p[@id='noWorkopportunities'") <b><---I get an error/nothing</b>
' Iterate all rows in the first table
For k = 0 To rows.Count - 1
-- modified 11-Jan-20 11:47am.
|
|
|
|
|
I am trying to send email using the EmailButton_Click code. However I am getting the error on this line smtp.Send(mailMessage)
The error is System.Net.Mail.SmtpException: 'Cannot get IIS pickup directory.'
Can someone help me fix it please?
protected void EmailButton_Click(object sender, EventArgs e)
{
EmailButton.Visible = true;
string requestor = RequestorDropDownList.SelectedValue.ToString();
string message = "The following records have been prepped for processing. Valid cases will be processed.";
if (requestor.Length > 0)
message = string.Format(message);
using (MailMessage mailMessage = new MailMessage())
{
mailMessage.From = new MailAddress("NoReply_FTA@courts.state.mn.us");
MailAddress to = new MailAddress(requestor);
mailMessage.To.Add(to);
string ccEmailAddress = "okaymy1112@mail.com";
if (ccEmailAddress.Length > 0)
{
MailAddress ccto = new MailAddress(ccEmailAddress);
mailMessage.CC.Add(ccto);
}
mailMessage.Subject = "FTA Case Reset Notice";
mailMessage.Body = message;
SmtpClient smtp = new SmtpClient();
smtp.DeliveryMethod = SmtpDeliveryMethod.PickupDirectoryFromIis;
smtp.Send(mailMessage);
}
string msg = "No batches were found";
Response.Write("<script>alert('" + msg + "')</script>");
}
|
|
|
|
|