|
i am visual basic 6.0 programer and i want to update my self
so can you tell what is the process to conect database ms access 2003 with web page
usign ASP.Net 2003
if possible then please give me login example in ASP.net 2003
Thanks
Rikin Pandya
|
|
|
|
|
|
i need asp.net code for C# not for vb.net
can you tell me vb.net is used for creating a web site ?
Thanks for give me code because it will usefull for my another project
Thanks again
Rikin Pandya
|
|
|
|
|
|
I use a data connection web.config file stores path to access database.
private string strConnection =ConfigurationSettings.AppSettings["MYDATACon"];
Then in my pages I string my connections settings.
And here is an example of a page loading a data grid using sql statements.
private void LoadGrid()<br />
{<br />
GetHelpDeskTIR();<br />
strSQL="Select RecNumber, TIR,WorkOrder,ShadowStartDate,ShadowStartTime,ShadowEndTime,MethodInvoke from Test_Incident_Report where HelpDesk ='Yes' "+strCondition;<br />
int count=0;<br />
bool bIsError=false;<br />
con = new OleDbConnection(strConnection);<br />
<br />
ds = new DataSet();<br />
<br />
try<br />
{<br />
OleDbDataAdapter da = new OleDbDataAdapter(strSQL,con);<br />
count=da.Fill(ds);<br />
}<br />
catch(Exception err)<br />
{<br />
bIsError=true;<br />
}<br />
finally<br />
{<br />
con.Close();<br />
}<br />
if(!bIsError)<br />
{<br />
if(count!=0)<br />
{<br />
DataGrid1.DataSource=ds;<br />
DataGrid1.DataBind();<br />
}<br />
else<br />
SendUserAMessage("There are no HelpDesk records to validate at this time.");<br />
}<br />
}
|
|
|
|
|
Are you getting any error? is this not working?
|
|
|
|
|
No, works just fine for me, was offering some code examples like the guy asked for.
|
|
|
|
|
I am sorry. Since it was reply to my post, I thought it was RikinPandya asking for suggestion.
|
|
|
|
|
VB.NET Visual basic is nothing but a language like C# you can use it similar to C#.
Thanks and Regards
Sandeep
If you want something you never had,
do something you have never done!
|
|
|
|
|
Hi,
I have a master page and content page. In content page I have to validate the text boxes for
name,address, phone number and email address etc. But as content pages doersn't have html section not head or body section so, where I use this java script in content page to validate the form.
Thanks
seema
|
|
|
|
|
If it is something used by several pages you might want to put it in the master page. Since in your case it is specific to your content page you can just put the script tag right after the content tag. so something like:
<asp:Content ID="Content1" ContentPlaceHolderID="YourContent" Runat="Server">
<script type="text/javascript" language="javascript">
<!--
function TextBox
{
...
Hope that helps.
Ben
|
|
|
|
|
You could try the following. Put your javasscript in a .js file.
<br />
<br />
public void AddJavascript(string javascriptUrl)<br />
{
HtmlGenericControl script = new HtmlGenericControl("script");<br />
script.Attributes.Add("type", "text/javascript");<br />
script.Attributes.Add("src", ResolveUrl(javascriptUrl));<br />
this.Master.Page.Header.Controls.Add(script);<br />
<br />
}<br />
<br />
AddJavascript("~/Scripts/Default.js");<br />
<br />
The above is used to put the code in the master file, but you don't have to.
|
|
|
|
|
Another alternative is to use the ASP.NET ClientScriptManager class which provides methods (e.g., RegisterClientScriptBlock) to add javascript either at the top or bottom of a page. The class also provides methods to test whether a chunk of code has already been added.
|
|
|
|
|
Please, anybody, I need to display an image from an access database. Can you show me how? I can't seem to get any of the example I've found to work
|
|
|
|
|
Oh come on guys, do I ask that much? I'm sure you know, it's not hard, it's just that I get a picture that "cannot be displayed" and when I look inside (with mozilla) I see
/�'���
���!�ÿÿÿÿBitmap Image�Paint.Picture�"��'������PBrush����������Õ"�BMöÔ"��
and more stuff just like that. What am I doing wrong?
OleDbCommand command=new OleDbCommand("SELECT imagine FROM produse WHERE produse.cod_produs=10",dbconn);
Byte[] imagedata=(byte[])(command.ExecuteScalar());
Response.ContentType = "image/bmp";
Response.BinaryWrite(imagedata);
|
|
|
|
|
nc3b wrote: Oh come on guys, do I ask that much?
A bit patience perhaps? If you want 24/7 support with immediate response, you have to pay for it...
nc3b wrote: Response.ContentType = "image/bmp";
Response.BinaryWrite(imagedata);
Is it a bmp file that you have stored in the field?
---
single minded; short sighted; long gone;
|
|
|
|
|
|
Make sure that there is no markup in the page that gets sent along with the image data, only the @Page tag.
---
single minded; short sighted; long gone;
|
|
|
|
|
There isn't, and more, I say response.Clear(); before BinaryWrite()
|
|
|
|
|
I looked into the source again and I tried
Response.OutputStream.Write(imagedata,78,1000);
But now mozilla doesn't say the immage cannot be displayed, it just doesn't print it.
|
|
|
|
|
I did it. Just omit the first 78 bytes from the file. After this wonderful solution, I believe I won't let anyone persuade me again into writing aspx.
Why I don't like aspx.
|
|
|
|
|
In my web application , I have one master page with one tree View control.My tree view showing links based on the user who logined. How I can avoid database reading in Each page with out using Session Variables.
'TreeNodepopulate' Event is executing in each page load. How I can avoid this one.
Please Reply
Urgent......
Thanks in Advance
|
|
|
|
|
did you try using
ispostback property to avoid treeview control updating every time when page loades.
|
|
|
|
|
hi friends
i want to create javascript quiz..
i will get answer like this:
1.percentage of score
2.like totally 5 question,your correct answa was 1/5
3.comments: your scoring is poor
can u help me???
regards
saravanan
|
|
|
|
|
saravanan05 wrote: can u help me?
I don't know who this "u" person is that everybody seems to be talking about nowadays...
If you post a specific question, I am sure that there are a lot of people here who can help you. For a plain Javascript solution you should post in the web development forum, though.
---
single minded; short sighted; long gone;
|
|
|
|