|
Yes we can, the best example you can find is AJAX network call back approach. Where a web service exposed in the server side is consumed by the proxy client in the client system using javascript.
Regards,
Prakash Kalakoti
|
|
|
|
|
Thanks Prakash
i gave a wrong answer :->
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
Friend Ajax is the best example for you which does the same thing.... In fact this is leveraged most in .NET 3.0
|
|
|
|
|
Course you can ...look for the JS Soap Client on this VERY SITE
"Knock me down, I'll get straight back up again, I'll come back stronger than a powered up pacman"
(Lilly Allen / Kaiser Chiefs)
|
|
|
|
|
Hi Friends
I have to set up a server which stores audio and video files. This has to be done
using ASP.NET and SQL Server.That is, whenever there is a new audio or video file I should be able to browse and store it in the database.
Any idea how to achieve this.
Thank you
|
|
|
|
|
Can you please clarify your problem a little more?
Regards,
Prakash Kalakoti
|
|
|
|
|
I have to store audio files in SQL Server. WebPage users should be able to download those files when clicking on it. Iam using ASP.NET application. How can I do it.
|
|
|
|
|
A powerful server, hell lot of bandwidth and a seriously large storage disk. Coming down to the actual implementation, you can store any binary type in the SQL Server image datatype or the VarBinary(MAX) datatype (SQL Server 2005). You can design your ASP.NET application to handle your files like any other file stored in the database, unless you want to stream your content.
SG
|
|
|
|
|
Hi
Have you any idea that how to print a page in a button click without showing Print dialog for a web page.
If we use javascript window.print(), it prompts Print dialog. The requirement is direct printing on client side without prompting print dialog in a single button click on a web page. I am using ASP.NET with C#.
Solution require as soon as possible.
Thanks in advance.
|
|
|
|
|
I don't thik this is possible, as we don't have any control on client machine, any how if this is possible then it seems a big security issue.
Regards,
Prakash Kalakoti
|
|
|
|
|
To do that you need direct access to the client computer, and for that you need to use an ActiveX component that runs in the browser. This of course rules out all non-Windows operating systems.
---
single minded; short sighted; long gone;
|
|
|
|
|
Please write the ActiveX component name and how to use it.
|
|
|
|
|
Elena2006 wrote: Please write the ActiveX component name and how to use it.
I don't know of any specific component that does what you want. You have to decide exactly what it is that you want, and start looking around for components that do this.
---
single minded; short sighted; long gone;
|
|
|
|
|
Hi Elena
Did you ever find the solution to print without print dialog box in Java script ?
I'm in urgent need for it.
Thanks
Vishal Simon
|
|
|
|
|
Hi,
In an asp.net1.1 application I have a datagrid which was working but now its Command events (ButtonColumn and EditCommandColumn events )are not handled any more.The only change I made is adding a header and footer usercontrols.
Please any suggestion could be helpful.
I am too late but i will never give up
|
|
|
|
|
This is an issue with VS, if you open the page in design view some time the registered events gets removed automatically, so re-register your event.
Regards,
Prakash Kalakoti
|
|
|
|
|
Hi,
If you mean double click the event in the properties window then I did it already but no use.I have checked the event handling code (eventname+=new...) but every thing is ok.I forgot to mention that the datagrid is in a table cell (td) and the table is in a usercontrol.
I am too late but i will never give up
|
|
|
|
|
Hi,
As Prakash said, this is an issue with VS. I had faced similar problem just two days back. I had just clear the aspnet_wp.exe from the task manager, rebuild the application more than one times, then it got corrected. Try once more. it will work.
Best Wishes
Meeram395
|
|
|
|
|
Hello all,
i need to develop Content mgmt. system in ASP.NET/MySQL
any idea on how to start....?
|
|
|
|
|
I am trying to insert my COM Component into the toolbox of ASP.NET page using choose Items... but it is not embeddeding into the toolbox. sometimes it is visible in the tool box but in DISABLEd state.
How can I put my com component into the toolbox and make it Enable?
thnx in advance for suggestions
poojaaa
|
|
|
|
|
On Button Press, I am updating my userfeedback table certain columns, depending on who they are.
private void Button1_Click(object sender, System.EventArgs e)<br />
{<br />
bool bNoError =true;<br />
OleDbConnection con = new OleDbConnection(strConnection2);<br />
string strSQL;<br />
DataSet ds = new DataSet();<br />
CUsers user =new CUsers();<br />
user=(CUsers)Session["SessionUser"];<br />
switch(user.Role)<br />
{<br />
case "TL":<br />
if(TicketStatus.SelectedValue=="Closed")<br />
{<br />
string strStatus="Closed";<br />
TicketClosedBy.Text = strStatus; <br />
<br />
}<br />
strSQL="UPDATE UserFeedback set [TLComment]='"+TLComment.Text+"', [TicketStatus]='"+TicketStatus.SelectedValue+"', [TicketClosedBy]='"+TicketClosedBy.Text+"', [NeedAction]='"+NeedAction.Checked+"' WHERE autoNum="+autoNum.Text;<br />
break;<br />
case "CP":<br />
if(TicketStatus.SelectedValue=="Closed")<br />
{<br />
string strStatus="Closed";<br />
TicketClosedBy.Text = strStatus; <br />
<br />
}<br />
strSQL="UPDATE UserFeedback set [CPComment]='"+CPComment.Text+"', [TicketStatus]='"+TicketStatus.SelectedValue+"', [TicketClosedBy]='"+TicketClosedBy.Text+"' WHERE autoNum="+autoNum.Text;<br />
break;<br />
<br />
case "ORA":<br />
if(TicketStatus.SelectedValue=="Closed")<br />
{<br />
string strStatus="Closed";<br />
TicketClosedBy.Text = strStatus; <br />
<br />
}<br />
strSQL="UPDATE UserFeedback set [ORAComments]='"+ORAComments.Text+"', [TicketStatus]='"+TicketStatus.SelectedValue+"', [TicketClosedBy]='"+TicketClosedBy.Text+"' WHERE autoNum="+autoNum.Text;<br />
break;<br />
<br />
case "DMO":<br />
if(TicketStatus.SelectedValue=="Closed")<br />
{<br />
string strStatus="Closed";<br />
TicketClosedBy.Text = strStatus; <br />
<br />
}<br />
strSQL="UPDATE UserFeedback set [DMComments]='"+DMComments.Text+"', [TicketStatus]='"+TicketStatus.SelectedValue+"', [TicketClosedBy]='"+TicketClosedBy.Text+"' WHERE autoNum="+autoNum.Text;<br />
break;<br />
<br />
case "User":<br />
if(TicketStatus.SelectedValue=="Closed")<br />
{<br />
string strStatus="Closed";<br />
TicketClosedBy.Text = strStatus; <br />
<br />
}<br />
strSQL="UPDATE UserFeedback set [Comments]='"+Comments.Text+"', [TicketStatus]='"+TicketStatus.SelectedValue+"', [TicketClosedBy]='"+TicketClosedBy.Text+"' WHERE autoNum="+autoNum.Text;<br />
break;<br />
} <br />
<br />
try<br />
{<br />
OleDbDataAdapter da = new OleDbDataAdapter(strSQL,strConnection2); <br />
<br />
da.Fill(ds);<br />
DataTable mytable =ds.Tables[0];<br />
DataRow myRow ; <br />
myRow = mytable.Rows[0];<br />
<br />
string n ;<br />
foreach(DataColumn c in mytable.Columns)<br />
{<br />
n = c.ColumnName;<br />
if(n=="RecNumber")<br />
{<br />
continue;<br />
}<br />
myRow[n] =ControlTypeCheck.CheckControlType(Page.FindControl(n),n);<br />
}<br />
OleDbCommandBuilder cb = new OleDbCommandBuilder(da);<br />
da.Update(ds);<br />
<br />
}<br />
catch(Exception err)<br />
{<br />
string str=err.Message;<br />
bNoError=false;<br />
}<br />
finally<br />
{<br />
con.Close();<br />
}
Debug Error
C:\DIMHRS\HelpDesk\UserFeedBack.aspx.cs(426): Use of unassigned local variable 'strSQL'<br />
|
|
|
|
|
string strSQL;
maybe make it string strSQL = string.Empty;
|
|
|
|
|
Bloops, forgot to post, I got it right after I posted here... Yes the answer was needing to make the string empty, I did so by
string strSQL="";
Actualy, onto the next step of debugging, and almost certain this is my last debug error
Update of the code:
private void Button1_Click(object sender, System.EventArgs e)<br />
{<br />
bool bNoError =true;<br />
OleDbConnection con = new OleDbConnection(strConnection2);<br />
string strSQL="";<br />
DataSet ds = new DataSet();<br />
CUsers user =new CUsers();<br />
user=(CUsers)Session["SessionUser"];<br />
switch(user.Role)<br />
{<br />
case "TL":<br />
if(TicketStatus.SelectedValue=="Closed")<br />
{<br />
string strStatus="Closed";<br />
TicketClosedBy.Text = strStatus; <br />
<br />
}<br />
strSQL="UPDATE UserFeedback set [TLComment]='"+TLComment.Text+"', [TicketStatus]='"+TicketStatus.SelectedValue+"', [TicketClosedBy]='"+TicketClosedBy.Text+"', [NeedAction]='"+NeedAction.Checked+"' WHERE autoNum="+TicketNum.Text;<br />
<br />
break;<br />
case "CP":<br />
if(TicketStatus.SelectedValue=="Closed")<br />
{<br />
string strStatus="Closed";<br />
TicketClosedBy.Text = strStatus; <br />
<br />
}<br />
strSQL="UPDATE UserFeedback set [CPComment]='"+CPComment.Text+"', [TicketStatus]='"+TicketStatus.SelectedValue+"', [TicketClosedBy]='"+TicketClosedBy.Text+"' WHERE autoNum="+TicketNum.Text;<br />
break;<br />
<br />
case "ORA":<br />
if(TicketStatus.SelectedValue=="Closed")<br />
{<br />
string strStatus="Closed";<br />
TicketClosedBy.Text = strStatus; <br />
<br />
}<br />
strSQL="UPDATE UserFeedback set [ORAComments]='"+ORAComments.Text+"', [TicketStatus]='"+TicketStatus.SelectedValue+"', [TicketClosedBy]='"+TicketClosedBy.Text+"' WHERE autoNum="+TicketNum.Text;<br />
break;<br />
<br />
case "DMO":<br />
if(TicketStatus.SelectedValue=="Closed")<br />
{<br />
string strStatus="Closed";<br />
TicketClosedBy.Text = strStatus; <br />
<br />
}<br />
strSQL="UPDATE UserFeedback set [DMComments]='"+DMComments.Text+"', [TicketStatus]='"+TicketStatus.SelectedValue+"', [TicketClosedBy]='"+TicketClosedBy.Text+"' WHERE autoNum="+TicketNum.Text;<br />
break;<br />
<br />
case "User":<br />
if(TicketStatus.SelectedValue=="Closed")<br />
{<br />
string strStatus="Closed";<br />
TicketClosedBy.Text = strStatus; <br />
<br />
}<br />
strSQL="UPDATE UserFeedback set [Comments]='"+Comments.Text+"', [TicketStatus]='"+TicketStatus.SelectedValue+"', [TicketClosedBy]='"+TicketClosedBy.Text+"' WHERE autoNum="+TicketNum.Text;<br />
break;<br />
} <br />
<br />
try<br />
{<br />
OleDbDataAdapter da = new OleDbDataAdapter(strSQL,strConnection2); <br />
<br />
da.Fill(ds);<br />
DataTable mytable =ds.Tables[0];<br />
DataRow myRow ; <br />
myRow = mytable.Rows[0];<br />
<br />
string n ;<br />
foreach(DataColumn c in mytable.Columns)<br />
{<br />
n = c.ColumnName;<br />
if(n=="RecNumber")<br />
{<br />
continue;<br />
}<br />
myRow[n] =ControlTypeCheck.CheckControlType(Page.FindControl(n),n);<br />
}<br />
OleDbCommandBuilder cb = new OleDbCommandBuilder(da);<br />
da.Update(ds);<br />
<br />
}<br />
catch(Exception err)<br />
{<br />
string str=err.Message;<br />
bNoError=false;<br />
}<br />
finally<br />
{<br />
con.Close();<br />
}
Exception err is throwing
"Data type mismatch in criteria expression"
|
|
|
|
|
Why do people insist on catching errors they don't know how to handle then throw away useful information!
I would suspect that you shouldn't be getting a data type mismatch error at all, so why are you catching it here... Oh... I see because it it the button click event handler...
Why do you have database code in the presentation layer?! You'll be glad you don't work for the company I work for. It is written into out coding standards documentation that the use of data access code in a windows or web form is a sackable offence.
First, comment out the catch block. Find out exacly what is causing the exception and fix it.
|
|
|
|
|
This was surely not production code ? The giveaway is that the button is called Button1....
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|