|
Sir,
how to findout the records present in Ms access table by asp.net coding.If anything functions are there...
Please tell
|
|
|
|
|
Sarguna Reddiar wrote: how to findout the records present in Ms access table by asp.net coding
ASP.NET is a framework for developing web applications. There is no database access functionality in ASP.NET. If you wish to access the database you would be better looking at ADO.NET - That is the part of the .NET framework that is concerned with databases.
|
|
|
|
|
I have a web site written with visual studio .net2003 (c#). I installed the professional version of the visual studio .net2005 and upgrade the web project. After the upgrade conversion, I did not see the bin directory under the web directory. I tried to create a new web site using the 2005, I did not see the bin directory either. So what happened. The actual web site is hosted by a web hosting company and I can only access the web root dir using ftp or front page extension. After I upgrade the web and rebuild the project on my local computer, then I transfered everything to the remote site. Some of the web page can not be opened. Could someone help me how to resolve my problem. Thanks a lot in advance.
pingtian@comcast.net
|
|
|
|
|
pingtian wrote: After I upgrade the web and rebuild the project on my local computer, then I transfered everything to the remote site.
There is a step missing. Did you test it on your local machine first? Did you even run it on your local machine?
|
|
|
|
|
.net 2005 uses a different compilation mode, called dynamic compilation. In .net2003, the compilation was handled by Visual Studio and the result was a dll in the bin folder. With .net2005, ASP.NET handles the compilation "on-the-fly" and therefore there is no dll.
But there is a new add-in (now part of Visual Studio 2005 SP1) called Web Application Projects which allows you to use the same compilation mode used in .net2003; a dll is compiled by VS and placed in the bin folder. One major reason for the creation of this add-in was to assist in the upgrading of .net2003 projects to .net2005.
http://ASP.NET has an article regarding the Web Application Projects on there home page.
|
|
|
|
|
I don't know how to alert the user that he has reached the limited characters count of the TextBox, using the Validation Controls!
I used the RangeValidator and set the Type to string, set the MinimumValue to 1 and the MaximumValue to 255, but it works incorrect, I also used the RegularExpression using the [\ws]{1,255} string, but doesn't work! I'm not good at RegularExpression can anyone help please?
Sojaner!
|
|
|
|
|
u can use the ValidationSummary i guess
it should work
Estarta
|
|
|
|
|
I can alert the user, but don't know how to validate the length of the text in the TextBox!
Sojaner!
|
|
|
|
|
Check the MAXLENGTH property for the textbox
and thanks for ur answer on my authentication question.. but how can i put the pages in folder ?!
Estarta
|
|
|
|
|
I have used the MaxLength but it doesn't have any effect! I still can write more that the MaxLenght!
In the Solution Explorer right-click the second nude from the top and add a folder, then simply drag and drop your pages to it in the solution explorer and the visual studio will change all the links you have mad to these pages!
Sojaner!
|
|
|
|
|
Thanks alot mano
about the Maxlengeth i donno exactly wats wrong but it should work man!
i will check it now and i will let u know
Estarta
|
|
|
|
|
Don't mention it!
Thanx!
Sojaner!
|
|
|
|
|
Dear
Can you give me code and clear details where you are struck. And whats your problem. I will try to help you? ok.
S/W Engineer
Akebono Soft Technologies
aleem_abdul@akebonosoft.com.
|
|
|
|
|
u can set maxlength proerty as u want
or for alert message u can use javascript function
like
TextBox1.Attributes.Add("onkeypress", "Function();");(write this line in page load and the function in designerhtml view)
in that function u write the code to count characters...
(this fn. can be called for each and every key entry from keyboard )
nZoy..!
|
|
|
|
|
And count the characters length as document.getElementById(<textbox1 take="" its="" client="" id).value.length,="" thats="" all.="" do="" it,="" you="" will="" get="" it.=""
<div="" class="ForumSig">S/W Engineer
Akebono Soft Technologies
aleem_abdul@akebonosoft.com.
|
|
|
|
|
Hello guys
im building a web application, and i have a problem which is in the home page i have a login page, and other information.. i wanna to give access to all users to the information in the homepage, but not to the pages inside my application.. and how can i make the authenticated user to log out!
'i want to give access to all users to some pages not all pages'
and the authenticated users can access them all.
thanks in advance
Regards
Estarta
|
|
|
|
|
As much as I know, you should put the pages that you don't want to get access to in a folder and put a Web.Config file in that folder and set this tag:
<system.web><br />
<authentication mode="Forms"><br />
<forms loginUrl="login.aspx"/><br />
</authentication><br />
</system.web>
this way you will make users to login before they can see the content of this folder(they will be redirected to login.aspx automatically)!
And when you can Log some user in using:
System.Web.Security.FormsAuthentication.RedirectFromLoginPage();
you can log him out using:
System.Web.Security.FormsAuthentication.SignOut();
Sojaner!
|
|
|
|
|
A web designer that *sucks* gave me this HTML to build a dynamic news/event section with. The trouble is that the HTML isn't clean and something about it causes it to not look right. Is there a simpler way to do this maybe without divs. I've wasted 60 hours trying to make this crap work and I just don't know HTML well enough at all to make it look better.
Here's a link to how it looks and you can see the problem in the bottom of the events table.
http://www.code-frog.com/divs_suck.htm
Here's the code:
<table border="0" cellspacing="0" cellpadding="0" id="table5">
<tr>
<td><img border="0" src="table_title_recentnews.gif" width="282" height="22"></td>
</tr>
<tr>
<td background="background_recentnews.gif" valign="top" align="left" style="height: 133px"><div align="center">
<table border="0" width="274" cellspacing="3" cellpadding="0" id="table6">
<tr>
<td width="7" valign="top"><p align="center"> <font face="Tahoma"> <span style="font-size: 8pt">•</span></font></td>
<td width="267" valign="top"><font face="Tahoma" style="font-size: 8pt"> October 31, 2006 - All Saints Mass at BKHS1 at 9:30am.</font> <font face="Tahoma" style="font-size: 7pt"> <u><b><a href="SaintsMass1.aspx">more info</a></b></u></font></td>
</tr>
</table>
<div align="center">
<table border="0" width="274" cellspacing="3" cellpadding="0" id="table7">
<tr>
<td width="7" valign="top"><p align="center"> <font face="Tahoma"> <span style="font-size: 8pt">•</span></font></td>
<td width="267" valign="top"><font face="Tahoma" style="font-size: 8pt"> October 31, 2006 - All Saints Mass at BKHS2 at 9:30am.</font> <font face="Tahoma" style="font-size: 7pt"> <u><b><a href="SaintsMass2.aspx">more info</a></b></u></font></td>
</tr>
</table>
<div align="center">
<table border="0" width="274" cellspacing="3" cellpadding="0" id="table8">
<tr>
<td width="7" valign="top"><p align="center"> <font face="Tahoma"> <span style="font-size: 8pt">•</span></font></td>
<td width="267" valign="top"><font face="Tahoma" style="font-size: 8pt"> October 31, 2006 - All Saints Mass at BKHS3 at 9:30am.</font> <font face="Tahoma" style="font-size: 7pt"> <u><b><a href="SaintsMass3.aspx">more info</a></b></u></font></td>
</tr>
</table>
</div>
</div>
</div></td>
</tr>
<tr>
<td><img border="0" src="spacer_eight_pixels.gif" width="8" height="8"><br>
<img border="0" src="table_title_upcomingevents.gif" width="282" height="22"></td>
</tr>
<tr>
<td background="background_upcomingevents.gif" height="97" align="center" valign="top"><div align="center">
<table border="0" width="274" cellspacing="3" cellpadding="0" id="table14">
<tr>
<td width="7" valign="top"><p align="center"><font face="Tahoma"> <span style="font-size: 8pt">•</span></font></td>
<td width="267" valign="top"><font face="Tahoma" style="font-size: 8pt"> November 29, DWA1 - Freshman</font> <font face="Tahoma" style="font-size: 7pt"> <u><b><a href="Freshman1.aspx">more info</a></b></u></font></td>
</tr>
</table>
<div align="center">
<table border="0" width="274" cellspacing="3" cellpadding="0" id="table15">
<tr>
<td width="7" valign="top"><p align="center"><font face="Tahoma"> <span style="font-size: 8pt">•</span></font></td>
<td width="267" valign="top"><font face="Tahoma" style="font-size: 8pt"> November 29, DWA2 - Freshman</font> <font face="Tahoma" style="font-size: 7pt"> <u><b><a href="Freshman2.aspx">more info</a></b></u></font></td>
</tr>
</table>
<div align="center">
<table border="0" width="274" cellspacing="3" cellpadding="0" id="table16">
<tr>
<td width="7" valign="top"><p align="center"><font face="Tahoma"> <span style="font-size: 8pt">•</span></font></td>
<td width="267" valign="top"><font face="Tahoma" style="font-size: 8pt"> November 29, DWA3 - Freshman</font> <font face="Tahoma" style="font-size: 7pt"> <u><b><a href="Freshman3.aspx">more info</a></b></u></font></td>
</tr>
</table>
<div align="center">
<table border="0" width="274" cellspacing="3" cellpadding="0" id="table17">
<tr>
<td width="7" valign="top"><p align="center"><font face="Tahoma"> <span style="font-size: 8pt">•</span></font></td>
<td width="267" valign="top"><font face="Tahoma" style="font-size: 8pt"> November 29, DWA4 - Freshman</font> <font face="Tahoma" style="font-size: 7pt"> <u><b><a href="Freshman4.aspx">more info</a></b></u></font></td>
</tr>
</table>
</div>
</div>
</div>
</div></td>
</tr>
</table>
|
|
|
|
|
good GOD!!! This dude/chick makes my head spin with all those nested tables and divs. Uhh... maybe a CSS?!?!
Why don't you build your own structure, and place the *meat* where you want it to appear? Run them at server so you can manipulate the html elements for dynamic data insertion.
p.s.
Coffee (Nila)
|
|
|
|
|
Grapes-R-Fun wrote: Why don't you build your own structure
I'm attempting this but lack the experience to know how to produce the outlines that around each row and the subsequent tables. I *HATE* html.
|
|
|
|
|
Let me put something together for you then. In the meantime, are you using C# or VB.Net as your code behind?
Nila
|
|
|
|
|
C#
Here's what I'm trying to do: (I'm omitting a lot of code here and tried to keep it short and sweet.)
protected void Page_Load(object sender, EventArgs e)
{
PageContent _PG = new PageContent();
string tmpHTML = "";
tmpHTML += " <table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" id=\"table5\">" + "\r\n";
tmpHTML += " <tr>" + "\r\n";
tmpHTML += " <td>" + "\r\n";
tmpHTML += " <img border=\"0\" src=\"table_title_recentnews.gif\" width=\"282\" height=\"22\"></td>" + "\r\n";
tmpHTML += " </tr>" + "\r\n";
tmpHTML += " <tr>" + "\r\n";
tmpHTML += " <td background=\"background_recentnews.gif\" valign=\"top\" align=\"left\" style=\"height: 133px\">" + "\r\n";
tmpHTML += _PG.BuildNewsContent();
tmpHTML += " </td>" + "\r\n";
tmpHTML += " </tr>" + "\r\n";
tmpHTML += " <tr>" + "\r\n";
tmpHTML += " <td>" + "\r\n";
tmpHTML += " <img border=\"0\" src=\"spacer_eight_pixels.gif\" width=\"8\" height=\"8\"><br>" + "\r\n";
tmpHTML += " <img border=\"0\" src=\"table_title_upcomingevents.gif\" width=\"282\" height=\"22\"></td>" + "\r\n";
tmpHTML += " </tr>" + "\r\n";
tmpHTML += " <tr>" + "\r\n";
tmpHTML += " <td background=\"background_upcomingevents.gif\" height=\"97\" align=\"center\" valign=\"top\">" + "\r\n";
tmpHTML += _PG.BuildEventContent();
tmpHTML += " </td>" + "\r\n";
tmpHTML += " </tr>" + "\r\n";
tmpHTML += " </table>" + "\r\n";
InLineHTML.Text = tmpHTML; //This InLineHTML is an ASP:LITERAL
}
public string BuildNewsContent()
{
string tmpHTML = "";
string _Result = "";
int _DivCounter = 0;
bool _bFirstPass = true;
int tableRow = 6;
while (thisReader.Read())
{
_DivCounter += 1;
tmpHTML += " <div align=\"center\">" + "\r\n";
tmpHTML += " <table border=\"0\" width=\"274\" cellspacing=\"3\" cellpadding=\"0\" id=\"table" + tableRow.ToString() + "\">" + "\r\n";
tmpHTML += " <tr>" + "\r\n";
tmpHTML += " <td width=\"7\" valign=\"top\">" + "\r\n";
tmpHTML += " <p align=\"center\">" + "\r\n";
tmpHTML += " <font face=\"Tahoma\">" + "\r\n";
tmpHTML += " <span style=\"font-size: 8pt\">•</span></font></td>" + "\r\n";
tmpHTML += " <td width=\"267\" valign=\"top\">" + "\r\n";
tmpHTML += " <font face=\"Tahoma\" style=\"font-size: 8pt\">" + "\r\n";
tmpHTML += thisReader["DateText"].ToString().Trim() + " - " + thisReader["SummaryText"].ToString().Trim() + "</font>" + "\r\n";
tmpHTML += " <font face=\"Tahoma\" style=\"font-size: 7pt\">" + "\r\n";
tmpHTML += " <u><b><a href=\"" + thisReader["MoreInfoURL"].ToString().Trim() + "\">more info</a></b></u></font></td>" + "\r\n";
tmpHTML += " </tr>" + "\r\n";
tmpHTML += " </table>" + "\r\n";
tableRow += 1;
}
for (int i = 1; i < _DivCounter + 1; i++)
{
tmpHTML += "</div>" + "\r\n";
}
_Result = tmpHTML;
return _Result;
}
public string BuildEventContent()
{
string tmpHTML = "";
string _Result = "";
int _DivCounter = 0;
bool _bFirstPass = false;
int tableRow = 14;
while (thisReader.Read())
{
if (_bFirstPass == false)
{
tmpHTML += " <div align=\"center\">";
_DivCounter += 1;
}
else
{
_bFirstPass = false;
}
tmpHTML += " <table border=\"0\" width=\"274\" cellspacing=\"3\" cellpadding=\"0\" id=\"table" + tableRow.ToString() + "\">" + "\r\n";
tmpHTML += " <tr>" + "\r\n";
tmpHTML += " <td width=\"7\" valign=\"top\">" + "\r\n";
tmpHTML += " <p align=\"center\"><font face=\"Tahoma\">" + "\r\n";
tmpHTML += " <span style=\"font-size: 8pt\">•</span></font></td>" + "\r\n";
tmpHTML += " <td width=\"267\" valign=\"top\">" + "\r\n";
tmpHTML += " <font face=\"Tahoma\" style=\"font-size: 8pt\">" + "\r\n";
tmpHTML += thisReader["EventText"].ToString().Trim() + "</font>" + "\r\n";
tmpHTML += " <font face=\"Tahoma\" style=\"font-size: 7pt\">" + "\r\n";
tmpHTML += " <u><b><a href=\"" + thisReader["MoreInfoURL"].ToString().Trim() + "\">more info</a></b></u></font></td>" + "\r\n";
tmpHTML += " </tr>" + "\r\n";
tmpHTML += " </table>" + "\r\n";
tableRow += 1;
}
for (int i = 0; i < _DivCounter; i++)
{
tmpHTML += "</div>" + "\r\n";
}
_Result = tmpHTML;
return _Result;
}
|
|
|
|
|
That could be fairly simple repeater control... When I get home I'll write it.
"Throughout human history, we have been dependent on machines to survive. Fate, it seems, is not without a sense of irony. " - Morpheus
|
|
|
|
|
Yeah, I've not ever used a repeater before. I'll look into that and see if I can solve the mystery.
|
|
|
|
|