|
hi,
whats wrong with you ? why u are posting same post again and again as new post ?
We all are here to help anybody but please take care of this.
Thank if you understand it.
Thanks,
Sun Rays
|
|
|
|
|
Hi,
How to create ASP.Net deployemnt with no source code
JK
|
|
|
|
|
krishnaklm wrote: How to create ASP.Net deployemnt with no source code
Here[ ^] is the Setup for Web Deployment. Good way of web deployment.
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
Hi friends
My code is:
public class database<br />
{<br />
<br />
public database()<br />
{<br />
}<br />
public static object ExecuteScaler(string constr, string cmdText, params object[] paramValue) {<br />
if (paramValue != null && paramValue.Length > 0)<br />
{<br />
SqlParameter[] cmdParameter = SetParameter(constr, cmdText);<br />
Assignparameter(cmdParameter, paramValue);<br />
SqlConnection con = new SqlConnection(constr);<br />
con.Open();<br />
return ExecuteScaler(con, cmdText, CommandType.StoredProcedure, cmdParameter);<br />
}<br />
else<br />
return ExecuteScaler(constr, cmdText, CommandType.StoredProcedure);<br />
}<br />
<br />
<br />
public static SqlParameter[] SetParameter(string constr, string cmdtext) {<br />
using (SqlConnection con = new SqlConnection(constr))<br />
using (SqlCommand cmd = new SqlCommand(cmdtext, con))<br />
{<br />
con.Open();<br />
cmd.CommandType = CommandType.StoredProcedure;<br />
SqlCommandBuilder.DeriveParameters(cmd);<br />
cmd.Parameters.RemoveAt(0);<br />
SqlParameter[] cmdparameter = new SqlParameter[cmd.Parameters.Count];<br />
cmd.Parameters.CopyTo(cmdparameter, 0);<br />
return cmdparameter;<br />
}<br />
}<br />
<br />
<br />
public static void Assignparameter(SqlParameter[] cmdparameter, object[] ParameterValue)<br />
{<br />
if ((cmdparameter == null) || (ParameterValue == null))<br />
return;<br />
if (cmdparameter.Length != ParameterValue.Length)<br />
throw new ArgumentException("Argument Error");<br />
for (int i = 0, j = cmdparameter.Length; i < j; i++)<br />
cmdparameter[i].Value = ParameterValue[i];<br />
<br />
}<br />
<br />
<br />
public static object ExecuteScaler(SqlConnection con, string cmdtext, CommandType cmdtype, params SqlParameter[] cmdparams) {<br />
SqlCommand cmd = new SqlCommand();<br />
Preparecmd(cmd, con, (SqlTransaction)null, cmdtype, cmdtext, cmdparams);<br />
object retval = cmd.ExecuteScalar();<br />
cmd.Parameters.Clear();<br />
return retval;<br />
<br />
}<br />
<br />
<br />
public static void Preparecmd(SqlCommand cmd, SqlConnection con, SqlTransaction sqlT, CommandType cmdType, string cmdtext, SqlParameter[] cmdParams)<br />
{<br />
if (con.State != ConnectionState.Open)<br />
con.Open();<br />
cmd.Connection = con;<br />
cmd.CommandType = cmdType;<br />
cmd.CommandText = cmdtext;<br />
if (cmdParams != null)<br />
AttachParameter(cmdParams, cmd);<br />
return;<br />
}<br />
<br />
<br />
public static void AttachParameter(SqlParameter[] cmdparamsvalues, SqlCommand cmd)<br />
{<br />
foreach (SqlParameter pp in cmdparamsvalues)<br />
{<br />
if (pp.Direction == ParameterDirection.InputOutput && pp.Value == null)<br />
pp.Value = DBNull.Value;<br />
<br />
cmd.Parameters.Add(pp);
}<br />
<br />
}
Error is: The SqlParameter is already contained by another SqlParameterCollection.
First i cal ExecuteScaler Method.
Plz help me out.
Thanks in advance
Pathan
GOD HELP THOSE WHO HELP THEMSELves
|
|
|
|
|
Imran Khan Pathan wrote: Plz help me out.
The clue is in the error message. You cannot have a SqlParameter in two SqlParameter collections.
I suspect, because I've never used SqlCommandBuilder, that it creates the parameters in a SqlParameterCollection. It does this because it expects you to use the command object it creates, but you throw it away. The parameters are still linked to the collection in which they were originally created.
|
|
|
|
|
Respected Gurus
I m working on asp.net 1.1
I am opening a form through javascript
on this form i have to take two dates from the user.and pass these two dates to the parent page.i m able to pass these dates if i m using textboxes.
but i dont want to use textboxes instead i want to use some calendar
if any one can give some good link for it.
keep in mind that i have to open the window through javascript and those calendars should be on that page itself.
Please suggest me.
|
|
|
|
|
|
thanks for your early response sir
but this does not fulfill my requirement.
my requirement is to open a window from javascript and again open a calendar in that javascript page.Fill the dates and pass these to the parent page.
Ajay
|
|
|
|
|
hi
this is the code <1111a href="javascript:calendar_window=window.open('calendarFORM.aspx?formname=Form1.txtDate','calendar_window','width=154,height=188');calendar_window.focus()">
or
<111a href="javascript:calendar_window=window.open('calendarFORM.aspx?formname=Form1.txtDate','calendar_window','width=154,height=188');calendar_window.focus()"1111/1>
you can try out this code in which txtdate is textbox which will get date from calendar popup
remoove 1111 etc from code
ok...
gs
|
|
|
|
|
hi
i have login form in that i am taking two fields
UserId and Password.
In my sql database i take feilds --
CREATE TABLE tUser
(
UserCode NUMERIC(8) NOT NULL
, UserID VARCHAR(20) NOT NULL
, FirstName VARCHAR(40) NOT NULL
, LastName VARCHAR(40) NOT NULL
, Password VARBINARY(60) NOT NULL
, UserType VARCHAR(20) NOT NULL
, ExpireDays NUMERIC(3) NULL
, WarningDays NUMERIC(3) NULL
, StatusCode VARCHAR(1) NOT NULL
, CreatedBy VARCHAR(10) NOT NULL
, CreateDate DATETIME NOT NULL
, UpdatedBy VARCHAR(10) NULL
, UpdateDate DATETIME NULL
, FullName VARCHAR(60) NOT NULL
)
GO
CREATE UNIQUE CLUSTERED INDEX tUser_idx ON tUser (UserCode)
then how can encrypt the password.
i am new in asp.net so pls give me a code with details.
gayatri
Gayatri
|
|
|
|
|
|
hello
i am chage my code but not yet its runable.
the code is
function openWindow()
> {
> hgt = 600;
> wdth= 760;
> tp= (screen.height/2)-(theHeight/2);
> lt= (screen.width/2)-(theWidth/2);
> ftr=
> 'height='+theHeight+',width='+theWidth+',top='+the Top+',left='+theLeft+",scr
> ollbars=yes";
> open ('page.aspx?','',features);
> }
this is javascript function .
and i called it in codebehind. changeble code is
ControlName.Attributes.Add("OnClick"openWindow(); return false;");
pls help me
Gayatri
Gayatri
|
|
|
|
|
in the openWindow function call the window by window.open(.......)
hope it will work
Tirtha
"A man can ride on your back only when it is bent....."
|
|
|
|
|
hey,
What error u got with this script ? let me know it .
i will works fine.
Regards,
Satips.
|
|
|
|
|
Hi All,
For one of my project, the following is the requirement. A user will upload files and while uploading , he can say for each attachment whether it is viewable by some other user or not. Currently for uploading many files we use the file upload and list box controls.
Now the client has asked for a checkbox adjacent to each list item in the list box. How to place check boxes with in a list box? Please throw some light on this and help me in solving the same.
Thanks in advance.
Regards,
Ram
|
|
|
|
|
dont you know about CheckedListBox ???
Tirtha
"A man can ride on your back only when it is bent....."
|
|
|
|
|
That is what I need. Could u please help me in finding out the same?
|
|
|
|
|
u can use grid view and put check box in gridview. that will be easier and for every uplaod u can store in datagrid. u can specify delete also in gridview.
Thanks,
Sun Rays
|
|
|
|
|
Thanks for your quick reply. I thought of doing that too. Even I thought of dynamically adding checkboxes and labels(for file names) to a table. But the requirement is "ListBox with Checkboxes".
If you find any relevant methods for doing this, please do reply. Thanks once again.
Regards,
Ram
|
|
|
|
|
if you are using vb.net and working on windows application check the CkeckedListBox control......I have already told u about this.....You can easily track/edit/delete items ....
Tirtha
"A man can ride on your back only when it is bent....."
|
|
|
|
|
This is for web application(asp.net)
Regards,
Ram
|
|
|
|
|
Here[^] is the sample for same.
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
I need similar type of control for web applications(asp.net)
Regards,
Ram
|
|
|
|
|
rammca wrote: I need similar type of control for web applications(asp.net)
Here[ ^] is the sample which has the class derived from CheckedListBox. You can use this extended class in your web application.
Hope this helps you.
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
hope this will help u..
http://support.microsoft.com/kb/145728
Thanks,
Sun Rays
|
|
|
|