|
A Repeater or a DataList should be good for what you are trying to do. You just have to define the template with labels, image controls and maybe an html literal control. As far as displaying part of the article, since it is stored as html that makes it much more difficult. Unless you have some standards in terms of how the html is formatted, it will be difficult to pull a html fragment that renders properly. For instance if the article html uses nested divs and you only pull enough text that you leave off the closing div tags it would be a mess.
|
|
|
|
|
Hi T M Gray,
Thank you for the response.
Can you tell me what is then the right and simple way to do this?
|
|
|
|
|
I have different web applications and I want to ask if it's advisable to create a web service to send emails through it so all my web applications will go there instead of having the Mail class or code in every web application...
what do you think?
|
|
|
|
|
Well it depends, are these applications going to different clients? In which case, hell no.
If it's your own personal use...maybe. Again, it depends on what you're doing with these applications. You might be porting these in which case you want them as encapsulated as possible so having an external webservice for doing an email is illogical.
I personally wouldn't anyway, every project is likely to have quirks meaning that you'll need to do customization on a per project with them.
|
|
|
|
|
One idea you may want to think about is to simply create an assembly that contains the mail code and distribute it to each application. Expose an interface for configuration and you have the ability to have a custom mail solution for each without the complexity of an extra layer in the system.
Remember that the more simplicity can be brought into a project, the more likely it is to actually work. (I know you're not a newbie, but I actually have to remind some of our architects of this periodically as well)
|
|
|
|
|
if no company policies, security officers and firewall should have been invented it would be possible
In Word you can only store 2 bytes. That is why I use Writer.
|
|
|
|
|
I agree with PogoboyMtK.Inspite of having an webservice,you can have a dll that can be used in all the applications, where you need.(If there is not any specific need of webservices, webservices will also not be good from performance point of view.)
|
|
|
|
|
A lot of Applications needs the email functionality that is possibly the same in some cases. The DLL VS Web-services is an easy choice.
DLL
1) DLL every time you make a change you need to compile it and distribute it in all the other Application(lets hope its not 20 like in my case)
Web-service
1) When you make a change in your web service you make it one place and all the other application will get the change.
i have more than 20 Win and web application and i wouldn't want to have a maintenance nightmare. As i said its easy to choose between the two as it is obvously the webservice is the best choice.
Thanks
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
If you follow the old COM world rules of never altering existing interfaces, just adding new ones if necessary, thereby keeping backward compatibility intact, you can easily distribute the newer versions of the dlls only to the applications affected and it is not necessary to update all the applications all of the time.
I do agree with you that if there are 20+ apps this could potentially become a maintenance nightmare because we all know that in larger companies, junior sustainment devs do "interesting" things when "improving" code they are working on, so the safer, yet more inefficient route would be to use the web service.
|
|
|
|
|
Hi all,
I am working on asp.net2.0
in my aspx page i have a gridview ,inside that i have a checkbox and ajax calendarextender control.
by default i am disabling the calendarextender control, but once u select the checkbox i need to enable the calendarextender control.
how to do that , if anybody knows please let me know
Regards
Rama
|
|
|
|
|
use an EditItemTemplate in the ItemTemplate for the field in the gridview that should show the calendar control.
When you check the box, set the line in Edit mode and the calendar control is available.
In Word you can only store 2 bytes. That is why I use Writer.
|
|
|
|
|
Hi,
AutoComplete Extender (using ajax autocompleteextender) is not working fine in VS2008 asp.net web application project.Database I used is MS Access 2007 Here is my code:
using System;
using System.Collections;
using System.Linq;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Xml.Linq;
using System.Data;
using System.Data.OleDb;
/// <summary>
/// Summary description for MyWebService
/// </summary>
[WebService(Namespace = "http://microsoft.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
// To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line.
//[System.Web.Script.Services.ScriptMethod]
[System.Web.Script.Services.ScriptService]
public class MyWebService : System.Web.Services.WebService {
public MyWebService () {
//Uncomment the following line if using designed components
//InitializeComponent();
}
[WebMethod]
[System.Web.Script.Services.ScriptMethod]
public string[] GetCountryInfo(string prefixText)
{
int count = 10;
string sql = "Select * from Country Where Country_Name like @prefixText";
OleDbDataAdapter da = new OleDbDataAdapter(sql, "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:/Documents and Settings/Leeds_Desk2/My Documents/trials.accdb");
da.SelectCommand.Parameters.Add("@prefixText", OleDbType.VarChar, 50).Value = prefixText + "%";
DataTable dt = new DataTable();
da.Fill(dt);
string[] items = new string[dt.Rows.Count];
int i = 0;
foreach (DataRow dr in dt.Rows)
{
items.SetValue(dr["Country_Name"].ToString(), i);
i++;
}
return items;
}
}
ASPX File
-------------
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:TextBox ID="TextBox1" runat="server" ></asp:TextBox>
<asp:Button ID="Button1" runat="server" Text="Button" />
<asp:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="true"><Services><asp:ServiceReference Path="~/MyWebService.asmx" /></Services></asp:ScriptManager>
<cc1:AutoCompleteExtender ID="AutoCompleteExtender1" runat="server" TargetControlID="TextBox1" CompletionInterval="1000" CompletionSetCount="20" UseContextKey="false" MinimumPrefixLength="1" ServiceMethod="GetCountryInfo" DelimiterCharacters=";," ServicePath="MyWebService.asmx"
EnableCaching="true" FirstRowSelected="true" CompletionListCssClass="completionList" CompletionListHighlightedItemCssClass="itemHighlighted"
CompletionListItemCssClass="listItem" ShowOnlyCurrentWordInCompletionListItem="true"></cc1:AutoCompleteExtender>
</div>
</form>
</body>
</html>
Please help me
|
|
|
|
|
If you are going to post code use pre tags, look at the "code block" menu item on the toolbar above the textbox where you entered your question. Also make sure you read the forum guidelines.
Have you debugged your application? Which part is not working? The extender? The database call?
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
|
anyone knows about one API which can be used with ASP.NET to post status and share on all social networks (or at least many social networks) like twitter, linkedin, etc.. instead of using a different API for every social network?
|
|
|
|
|
These projects are not written by the same people. If you want something that can do that, you'd have to get a hold of all the APIs and create a wrapper around them that would broker your data to each using the appropriate interfaces. That way it could appear to be a single API, but in reality I don't think it would exist as you want it to.
|
|
|
|
|
Hi,
I am new to web service... I have created a simple web service to add a record to sql server by passing a parameter and returns true or false once done...
At the same time, I want to return the customer_account_number value created on the sql server.. so basically I want to return the true and false and one (or more) additional values..
how can i do that please..
|
|
|
|
|
how about returning a struct?
|
|
|
|
|
any example there for the web services?
|
|
|
|
|
You need to create a struct with both values
public struct ServiceReturnArgs
{
public string id;
public bool result;
}
then serialize it and send the resulting string as the return value from the webmethod.
Deserialize on the consumer and voila, you have your results.
|
|
|
|
|
Basically, you have two options.
One create you own custom datatype, having as many properties as you want, and return the object of that.
Another approach would be,passing a ref parameter define webmethod
parameters, like
[WebMethod]
public string myMethod(string Id, ref int status)
{
status = 3;
return "result";
}
Now you will both the values at client.
|
|
|
|
|
Hi,
I am new to web service... I have created one web service using ASP.NET to insert a record in my sql server by passing one parameter.
my question, when user type the web service address in the browser address textbox it will show him what are the parameters to enter then he can enter there..
what if I don't want this happen? I just want user to be able to pass the parameters through my application only?
how can I protect the web service then?
|
|
|
|
|
|
I have 2 user groups say LDM and DM
In DM there are 3 users.If any of the DM approves the page status is completed.
LDM send a form for Review with status Inprogress and DM reviews it and the status is changed to Reviewed.
How to handle this in workflow using a form.Can this be a layout
SNO Workflow seq PAGE PAGE SENT FOR REVIEW Assigned to If Reject Go to Email
EDIT CHECKS
1 Assigned Edit Check Customization Edit Check Customization Role: -1 yes
Assign User:
2 Assigned Edit check Review Edit check Review Assigned users: 1 Yes
If anyone approves change status to completed
FEC
1 Inprogress FEC FEC Role: -1 yes
Assign User:
2 Reviewed FEC REVIEW FEC REVIEW Assigned users 1 Yes
If anyone approves change status to completed
|
|
|
|
|
I wanna run outlook on client,just like input "D:\PROGRA~1\MICROS~4\Office12\OUTLOOK.EXE" into run.
I don't want to use "mailto:",how can I do?
|
|
|
|