|
plzz tell me how to begin in serial communication using asp.net .... i have designed the platform but how to interface with gsm modem is a difficult task for me......
plzz help me out coz its a big one deal for me ......
thanks
regards
ajay
|
|
|
|
|
Check the first link here[^].
The best things in life are not things.
|
|
|
|
|
I have implemented Google Map in my asp.net website using .net framework 4.0.
Its working very well.
But the problem is that my web space doesn't support .net 4.0
So, i need to know how i can make this Google Map using .net framework 2.0
I tried many things but didn't succeeded
Please help me out of it!
Thanks
|
|
|
|
|
Google Maps is handled via JavaScript. This isn't dependent on the version of the .NET runtime, so you shouldn't need to change the mapping side. What you may need to change is your ASP.NET code if you are using .NET 3 or .NET 4 features, and there's nobody here who could help you with that without seeing your source code.
Change the project type to .NET 2 in your solution and recompile the application. See what defects this causes and fix as necessary.
In future, you might want to check such basic things as the target framework before commencing any work.
|
|
|
|
|
Hi all,
I have textbox with of email. It has two validation one is required and another is regularexpression.
Can i show different message for the both validation?
e.g
This is validation logic
[Required(ErrorMessage = "*")]
[DataType(DataType.EmailAddress)]
[RegularExpression("^[\\w-]+(\\.[\\w-]+)*@([a-z0-9-]+(\\.[a-z0-9-]+)*?\\.[a-z]{2,6}|(\\d{1,3}\\.){3}\\d{1,3})(:\\d{4})?$", ErrorMessage = "Email address should be in proper format (e.g. username@domain.com)")]
public String Email
{
get;
set;
}
Below is html
<div class="input_set">
<div class="editor-label">
@Html.LabelFor(model => model.Email)
</div>
<div class="editor-field">
@Html.TextBoxFor(model => model.Email)
<br />
@Html.ValidationMessageFor(model => model.Email)
</div>
</div>
Now i wnat to show @Html.ValidationMessageFor(model => model.Email) message in different location.
One person's data is another person's program.
--J.Walia
|
|
|
|
|
First of all, use pre tag to format your code.
You have a very limited control on ValidationMessage and ValidationSummary of DataAnnotation.
If you wish to customize it further, i would suggest to go for JQuery/Javascript validation.
|
|
|
|
|
hi,
Please suggest me some basic samples to create and use uercontrols(partial views) in MVC in vs2008,2010 as im to find the same in google...
|
|
|
|
|
siva455 wrote: as im to find the same in google...
Why to ask unneccesarily if you are able to get the same in Google.
If you have any pin point problem in your job, then you should ask that here.
|
|
|
|
|
Good Evening All
I have Silverlight application and it is rendering better(not Good) in IE and it renders differently from different browsers, like IE8,Firefox 3, 4, and worse in Chrome. i tried different examples , i used one example that was good , but the moment i view this in different browsers its just a mess.
here is my Page
<%@ Page Language="C#" AutoEventWireup="true" %>
<!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>EchashDev</title>
<style type="text/css">
html, body {
height: 100%;
overflow:auto;
float:left;
}
body {
padding: 0;
margin: 0;
}
#silverlightControlHost {
height: 100%;
text-align:left;
}
</style>
<script type="text/javascript" src="Silverlight.js"></script>
<script type="text/javascript">
function onSilverlightError(sender, args) {
var appSource = "";
if (sender != null && sender != 0) {
appSource = sender.getHost().Source;
}
var errorType = args.ErrorType;
var iErrorCode = args.ErrorCode;
if (errorType == "ImageError" || errorType == "MediaError") {
return;
}
var errMsg = "Unhandled Error in Silverlight Application " + appSource + "\n" ;
errMsg += "Code: "+ iErrorCode + " \n";
errMsg += "Category: " + errorType + " \n";
errMsg += "Message: " + args.ErrorMessage + " \n";
if (errorType == "ParserError") {
errMsg += "File: " + args.xamlFile + " \n";
errMsg += "Line: " + args.lineNumber + " \n";
errMsg += "Position: " + args.charPosition + " \n";
}
else if (errorType == "RuntimeError") {
if (args.lineNumber != 0) {
errMsg += "Line: " + args.lineNumber + " \n";
errMsg += "Position: " + args.charPosition + " \n";
}
errMsg += "MethodName: " + args.methodName + " \n";
}
throw new Error(errMsg);
}
</script>
</head>
<body background="http://ecash.ebam.co.za/Silverlight/images/MainBackground.jpg">
<form id="form1" runat="server" style="height:100%">
<div id="silverlightControlHost" >
<object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="100%" height="100%">
<param name="source" value="ClientBin/EchashDev.xap"/>
<param name="background" value="transparent" />
<param name="minRuntimeVersion" value="4.0.50826.0" />
<param name="onerror" value="OnErrorEventHandler"/>
<param name="Windowless" value="True" />
<param name="uiculture" value="<%= System.Threading.Thread.CurrentThread.CurrentUICulture %>" />
<param name="culture" value="<%= System.Threading.Thread.CurrentThread.CurrentCulture %>" />
<param name="autoUpgrade" value="true" />
<a href="http://go.microsoft.com/fwlink/?LinkID=149156&v=4.0.50826.0" style="text-decoration:none">
<img src="http://go.microsoft.com/fwlink/?LinkId=161376" alt="Get Microsoft Silverlight" style="border-style:none"/>
</a>
</object><iframe id="_sl_historyFrame" style="visibility:hidden;height:0px;width:0px;border:0px"></iframe></div>
</form>
</body>
</html>
and the Live website is http://ecash.ebam.co.za/Silverlight
i am using Firefox 5,when i run the page, the Silverlight movie does not get rendered, but in IE9 it does not get rendered but not nicely. you will see what i mean when you browse to the give Url.
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/
|
|
|
|
|
Hi Everybody!
How to rewrite URL like
http://www.mywebsite.com/(sessionid)/mypage
or
http://www.mywebsite.com/(ddjDD45sdskdjsdj%#kfjl)/mypage
where 'ddjDD45sdskdjsdj%#kfjl' is session id.
regards..
Sanjay Kunjam
------------------------------------------------------------------
"Computers are useless. They can only give answers" - Pablo Picasso
------------------------------------------------------------------
|
|
|
|
|
I'd start here[^] and I would certainly not use the session is in the URL. Far to easy to hack your site.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Yes may be..!
but i would like to insert my value rather than session id in between
the URL..!
Sanjay Kunjam
------------------------------------------------------------------
"Computers are useless. They can only give answers" - Pablo Picasso
------------------------------------------------------------------
|
|
|
|
|
Hello All
I am having dataset which contain values from data table. I want to export this dataset in to excel file without using htmltextWriter.
So please help me in this.
Thanks and regards
|
|
|
|
|
Hi
I am generating a excel file using Microsoft.Office.Interop.excel but the problem is the two excel file gets generated.one is with the file name that i had set. and other is with the name sheet1.xls. So please help me.
this is the code i am doing.+
public void excelgenerate(DataSet ds)
{
try
{
//Microsoft.Office.Interop.Excel.ApplicationClass excel = new ApplicationClass();
//excel.Application.Workbooks.Add(true);
Microsoft.Office.Interop.Excel.Application oAppln;
//declaring work book
Microsoft.Office.Interop.Excel.Workbook oWorkBook;
//declaring worksheet
Microsoft.Office.Interop.Excel.Worksheet oWorkSheet;
oAppln = new Microsoft.Office.Interop.Excel.Application();
oWorkBook = (Microsoft.Office.Interop.Excel.Workbook)(oAppln.Workbooks.Add(true));
//oWorkSheet = (Microsoft.Office.Interop.Excel.Worksheet)oWorkBook.ActiveSheet;
int i = 0;
foreach (System.Data.DataTable table in ds.Tables)
{
//oWorkSheet = new Microsoft.Office.Interop.Excel.Worksheet();
oWorkSheet = (Microsoft.Office.Interop.Excel.Worksheet)(oWorkBook.Worksheets.Add(Type.Missing, Type.Missing, Type.Missing, Type.Missing));
if (i == 0)
{
oWorkSheet.Name = "ActionPickListReport";
}
else
{
oWorkSheet.Name = "second";
}
oWorkSheet.Activate();
//oWorkBook.Worksheets.Add(null, null, 1, null);
//DataTable table = DATASETNAME.Tables[0];
int ColumnIndex = 0;
foreach (DataColumn col in table.Columns)
{
ColumnIndex++;
oWorkSheet.Cells[1, ColumnIndex] = col.ColumnName;
}
int rowIndex = 0;
foreach (DataRow row in table.Rows)
{
rowIndex++;
ColumnIndex = 0;
foreach (DataColumn col in table.Columns)
{
ColumnIndex++;
oWorkSheet.Cells[rowIndex + 1, ColumnIndex] = row[col.ColumnName].ToString();
}
}
// Worksheet worksheet = (Worksheet)oAppln.ActiveSheet;
//worksheet.Activate();
i++;
}
string fileName = "ActionPickReport.xls"; //System.Guid.NewGuid().ToString().Replace("-", "") + ".xls";
// string uploadfld = Server.MapPath("upload");
fileName = "C:\\Temp\\" + fileName;
//string strFile = "d://" + fileName;
//oWorkBook.Save();
oWorkBook.SaveAs(fileName, Microsoft.Office.Interop.Excel.XlFileFormat.xlWorkbookNormal, null, null, false, false, Microsoft.Office.Interop.Excel.XlSaveAsAccessMode.xlShared, false, false,null, null,null);
//oWorkBook._SaveAs(fileName, Microsoft.Office.Interop.Excel.XlFileFormat.xlWorkbookNormal, "abc", "abc", false, false, Microsoft.Office.Interop.Excel.XlSaveAsAccessMode.xlShared, false, false, null, null);
oAppln.Quit();
}
catch (Exception ex)
{
}
finally { }
}
|
|
|
|
|
Format your code using PRE tags.
|
|
|
|
|
HI all,
What will be way to validate the email Address without using the regular Expression .
Just give me the Idea i will do my self
Regards
Rameez
|
|
|
|
|
Here is idea[^]
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.
www.cacttus.com
|
|
|
|
|
|
Hi All,
I have an xml document in which I have xml elements as below. When I deserialize them its deserializing correctly but few attributes are missing from the existing application (actually we are developing a new application whose results should match with existing application). Here we are deserializing it in to objects and then again serializing those objects in xml back. There is little bit variation in the data in new system.
But what I am missing is, attributes like xsi:type="Reference", xsi:nil="true", xsi:nil="true" etc. How can I make changes in my Deserialization or serialization process so that my result would have attributes like this in their xml elements
Thanks in advance.
The xml element to be deserialized
----------------------------------
<Addresses>
<Address AddressCurrent="Current" HouseNumber="9541" PreDirectional="SE" StreetName="FIR" PostDirectional="" StreetType="TER" UnitType="APT" UnitNumber="1085" City="Beatty" State="OR" Zip="97000">
<Source code="F" IsFile="false" />
<Qualifier code="1" />
<Classification code="1" />
<DateReported>2002-08-01</DateReported>8387 E ELM CT</Address>
<Address AddressCurrent="Previous" HouseNumber="3962" PreDirectional="E" StreetName="OAK" PostDirectional="" StreetType="TPKE" UnitType="APT" UnitNumber="E215" City="Mitchell" State="OR" Zip="97000">
<Source code="F" IsFile="false" />
<Qualifier code="1" />
<Classification code="1" />
<DateReported>2007-06-01</DateReported>8571 N BAMBOO ST</Address>
<Address AddressCurrent="Previous" HouseNumber="4484" PreDirectional="NE" StreetName="BIRCH" PostDirectional="" StreetType="LN" UnitType="APT" UnitNumber="3" City="Shedd" State="OR" Zip="97000">
<Source code="F" IsFile="false" />
<Qualifier code="1" />
<Classification code="1" />2539 NW FIR CT</Address>
</Addresses>
And below are the results
These following aatribtes that are missing my application.
* <Address xsi:type="Reference">
* <DateReported xsi:nil="true" />
* <DateResident xsi:nil="true" />
*<Street2 /> is shown in QA, but not in Production Delta.
****** QUTU Delta Report in my application
------------------------------------------
- <Addresses>
- <Address>
<Bureau>TransUnion</Bureau>
<AddressType>CurrentAddress</AddressType>
<City>Beatty</City>
<State>OR</State>
<Street1>9541 SE FIR TER APT 1085</Street1>
<Street2 />
<Zip>97000</Zip>
</Address>
- <Address>
<Bureau>TransUnion</Bureau>
<AddressType>PreviousAddress</AddressType>
<City>Mitchell</City>
<State>OR</State>
<Street1>3962 E OAK TPKE APT E215</Street1>
<Street2 />
<Zip>97000</Zip>
</Address>
- <Address>
<Bureau>TransUnion</Bureau>
<AddressType>PreviousAddress2</AddressType>
<City>Shedd</City>
<State>OR</State>
<Street1>4484 NE BIRCH LN APT 3</Street1>
<Street2 />
<Zip>97000</Zip>
</Address>
</Addresses>
***** QUTU Delta Report in Existing System
------------------------------------------
- <Addresses>
- <Address xsi:type="Reference">
<Bureau>TransUnion</Bureau>
<AddressType>CurrentAddress</AddressType>
<City>Monroe</City>
<State>OR</State>
<Street1>2971 S OAK TPKE</Street1>
<Zip>97000</Zip>
<DateReported xsi:nil="true" />
<DateResident xsi:nil="true" />
</Address>
- <Address xsi:type="Reference">
<Bureau>TransUnion</Bureau>
<AddressType>PreviousAddress</AddressType>
<City>Coos Bay</City>
<State>OR</State>
<Street1>7080 SW CEDAR LN</Street1>
<Zip>97000</Zip>
<DateReported xsi:nil="true" />
<DateResident xsi:nil="true" />
</Address>
- <Address xsi:type="Reference">
<Bureau>TransUnion</Bureau>
<AddressType>PreviousAddress2</AddressType>
<City>Phoenix</City>
<State>OR</State>
<Street1>5050 S BIRCH TER</Street1>
<Zip>97000</Zip>
<DateReported xsi:nil="true" />
<DateResident xsi:nil="true" />
</Address>
</Addresses>
Thanks & Regards,
Abdul Aleem Mohammad
St Louis MO - USA
|
|
|
|
|
I have a datagrid containing multiple rows / columns, each cell contains a textbox.
How do I kick off a server side event when a user mouseclicks or tabs into a cell / textbox, there doesn t seem to be a standard event so was wondering if i need to add javascript to kick of the event.
theres a onTextChanged Event but no onFocus Event
any ideas would be really helpful
|
|
|
|
|
You can use __doPostBack() function of javascript.
Please search for it, it will help you.
|
|
|
|
|
Hi,
please let me know the concept of Resolving class using interface using UNITY ...
with a simple example....
Just want to know the advantage of using this design pattern(Ioc)...and how does it makes difference from normal approach...and the the basic idea of why to use unity framework...
|
|
|
|
|
I'm using a Repeater to display a list of events. Here's a stripped down version of the code:
<asp:Repeater ID="rptEvents" runat="server">
<ItemTemplate>
<table style="width: 100%" border="1">
<tr>
<td style="width: 180px; white-space: nowrap;">
<img align="middle" alt="Events" src="images/thumbnail.png" style="width: 50px; height: 51px" />
<asp:Label ID="lblEventName" runat="server"></asp:Label>
</td>
<td>
<asp:Label ID="lblDescription" runat="server"></asp:Label>
</td>
</tr>
</table>
</ItemTemplate>
</asp:Repeater>
Notice that the first column has been set to "white-space: nowrap" so that longer event names will push the column to be wider. Here's some sample html that the Repeater would generate:
<table style="width: 100%" border="1">
<tr>
<td style="width: 100px; white-space: nowrap;">
<img align="middle" alt="Events" src="thumbnail.png" />
<span id="rptEvents_ctl00_lblEventName">New Products Overview</span>
</td>
<td>
<span id="rptEvents_ctl00_lblDescription">Showcases the new products the will be released this year.</span>
</td>
</tr>
</table>
<table style="width: 100%" border="1">
<tr>
<td style="width: 100px; white-space: nowrap;">
<img align="middle" alt="Events" src="thumbnail.png" />
<span id="rptEvents_ctl01_lblEventName">Supervisor Planning Meeting</span>
</td>
<td>
<span id="rptEvents_ctl01_lblDescription">All supervisors must be present.</span>
</td>
</tr>
</table>
<table style="width: 100%" border="1">
<tr>
<td style="width: 100px; white-space: nowrap;">
<img align="middle" alt="Events" src="thumbnail.png" />
<span id="rptEvents_ctl02_lblEventName">Holiday Weekend</span>
</td>
<td>
<span id="rptEvents_ctl02_lblDescription">The company will close for the week of Christmas.</span>
</td>
</tr>
</table>
If and when that occurs, I want the first column in each repeater item to be the same width as the column with the longest event name.
How can I do such a task? Would I have to employ some sort of javascript?
|
|
|
|
|
Hi
I am using Visual Web Developer 2010 Express to develop a website.
I am still busy developing the website, but my boss wants to demo what we have so far at a congress.
Is it possible to deploy the website on a temporary basis on a Windows XP Professional computer so that my boss can access it via the internet from the congress venue in another city?
Thank you for the help.
Kobus
|
|
|
|
|
It is - you have to install Internet Information Server, or use IIS Express[^] (I'd choose IIS Express if I were you).
|
|
|
|