|
You can create public properties and then set it and use it in the user control.
Apurva Kaushal
|
|
|
|
|
Create as a Public property and use it in ur UC
Regards,
Satips.
|
|
|
|
|
Hi Everyone
I want to know the process of Online shopping in ASP.NET.
Any helping hint or guidence is highly appreciated.
Thanks in advance.
Bajrang Singh
Using .net 2.0 (VS2005)
|
|
|
|
|
You can get it Here[^]
Apurva Kaushal
|
|
|
|
|
|
Hi Guys,
This is the first time i am working on asp.net project with oracle as backend. anyways my problem is that i am not able to insert data into oracle tables.
This is what i am doing.
I have a class file in which i have defined a function for insertion by calling stored procedure i ahve written at the back end
And i am calling the function written in class file from the aspx page by creating object of the class and calling the function. Now the error which i am getting says this: Length cannot be less than zero. Parameter name: length
THE CODE FOR CLASS FILE IS PASTED BELOW
public void SaveContractHeader(
string refNumber
,int suppID
,int catID
,string Buyer
,int contVal
,string contStDate
,string contEndDate
,string contRevDate
,int insVal
,string insStDate
,string insEndDate
,string insRevDate
,int totalContVal
,int annualVal
,int locID
,int statusID
,string conOwner
,string remarks
,string docname
,string itemIdstack
,string rateStack
,string unitStack
,string UOMStack
,string currencyStack
, ref int intErrCode
, ref string strMsg
)
{
}
The problem is with this function this is what i think...do send solution as soon as possible.
Thanks,
Azeem
|
|
|
|
|
Hi,
At which line your code is getting blown?
Thanks and Regards,
Chetan Ranpariya
|
|
|
|
|
<big<b>THIS IS THE ERROR SCREEN WITH STACK TRACE. I have checked the field lengths in database and the parameters i am setting at the front end length of both are same. but still i am getting this error. Please Help.
<br />
Length cannot be less than zero. Parameter name: length <br />
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. <br />
<br />
Exception Details: System.ArgumentOutOfRangeException: Length cannot be less than zero. Parameter name: length<br />
<br />
Source Error: <br />
<br />
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. <br />
<br />
Stack Trace: <br />
<br />
<br />
[ArgumentOutOfRangeException: Length cannot be less than zero.<br />
Parameter name: length]<br />
System.String.Substring(Int32 startIndex, Int32 length) +172<br />
iCon.Common.Class.ClsDBCommon.SaveContractHeader(String refNumber, String suppID, String catID, String Buyer, Int32 contVal, String contStDate, String contEndDate, String contRevDate, Int32 insVal, String insStDate, String insEndDate, String insRevDate, Int32 totalContVal, Int32 annualVal, String locID, Int32 statusID, String conOwner, String remarks, String docname, String itemIdstack, String rateStack, String unitStack, String UOMStack, String currencyStack, Int32& intErrCode, String& strMsg) in u:\common\class\clsdbcommon.cs:661<br />
iCon.contractForm.btnSubmit_ServerClick(Object sender, EventArgs e) in u:\contractform.aspx.cs:238<br />
System.Web.UI.HtmlControls.HtmlInputButton.OnServerClick(EventArgs e) +108<br />
System.Web.UI.HtmlControls.HtmlInputButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +57<br />
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +18<br />
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +138<br />
System.Web.UI.Page.ProcessRequestMain() +1292<br />
Thanks in advance.
Azeem Qaiser
|
|
|
|
|
I have one website which i have designed using html,
resolution of my machines is 600*800,it gets displayed properly on my machine.But if it is ruuning on some other resolution the page doesnt get displayes properly.
can u tell me any way by which changing resolution doesnt change the structure of my website.
GIRISH
|
|
|
|
|
Are you using % or absolute widths when setting out your html page?
|
|
|
|
|
Yes i am giving diffrent width for each td and controls,but it is getting displayed properly on my machine with resolution 800*600.So wt should i do?
|
|
|
|
|
Yes, but are you using percentage or absolute widths.
If you use percentage widths, then it will expand to the width of it's container (in your case, i'm guessing the screen).
If you use absolute, then it will always occupy that many pixels on screen.
|
|
|
|
|
Dear girish,
Firstoff all U should have to pur your all control within table tag means in & second thing U should have to give your width of the control in % (percentage) not in Pixcel(100px)
did u do that ????
if you are directly drag and drop the controls on the webform then they may be get disturb after change in resolution....
regards,
koolprasad2003
If the message is useful for U then please Rate This message...
Be a good listener...Because Opprtunity knoughts softly...N-Joy
|
|
|
|
|
|
Dear All,
I would like to find out it the generated image waste the resources of the server?
this.image = bitmap;
output by :
ci.Image.Save(this.Response.OutputStream, ImageFormat.Jpeg);
thanks
|
|
|
|
|
I have 240 columns in my database table,
i want to display 5 colums in each row,it means first 5 cloumns in first row,next 5 in next row and like wise,
i am getting this output properly with the given code which i am sending but the inner table doesnt shows the border,wt could be the reason??
Dim rows As Integer
For rows = 0 To ds.Tables("transaction").Rows.Count - 1
i = ds.Tables("transaction").Columns.Count
k = i / 5
For j = 0 To k - 1
Response.Write("")
Response.Write("" & dd.Item(rows).ToString() + "")
For i = 0 To 4
Response.Write("" & ds.Tables("transaction").Rows(0)(l).ToString() + "")
l = l + 1
Next
'Response.Write("" & ds.Tables("transaction").Rows(0)(i).ToString() + "")
Response.Write("")
Next
l = 0
Response.Write(" ")
Response.Write("")
Response.Write("")
Response.Write("")
Response.Write("")
Next
Response.Write("")
Response.Write("")
Response.Write("Back")
Response.Write(" ")
Response.Write("")
Response.Write("")
Response.Write("")
GIRISH
|
|
|
|
|
differnce between these
response.redirect("login.page");
server.transfer("login.page");
asap
|
|
|
|
|
|
Server.Transfer is often a better choice than Response.Redirect.
Example:Let's say you're on A.aspx and you want to send the user to B.aspx.
Response.Redirect flow
A.aspx calls Response.Redirect("B.aspx",false); which sends a 302 redirect header down to the client browser, telling it that the asset it has requested (A.aspx) has moved to B.aspx, and the web application terminates. The client browser then sends a request to the webserver for B.aspx. IIS tells asp_wp.exe to process the request. asp_wp.exe (after checking authentication and doing all the other setup stuff it needs to do when a new request comes in) instantiates the appropriate class for B.aspx, processes the request, sends the result to the browser, and shuts down.
Server.Transfer flow
A.aspx calls Server.Transfer("B.aspx");. ASP.NET instantiates the appropriate class for B.aspx, processes the request, sends the result to the browser, and shuts down.
Note that Server.Transfer cuts the load on the client and the server.
Server.Transfer is easier to code for, too, since you maintain your state. Information can be passed through the HTTP Context object between the pages, eliminating the need to pass information in the querystring or reload it from the database.
Regards,
Satips.
|
|
|
|
|
response.redirect("");
In this method the redirection to the page is sent to the browser.
From the browser it is redirected to the page.
i.e Process goes like this
Server -> client(browser) -> Server -> client(browser)
set redirect the page Page is loaded
redirect
command to
the browser
server.transfer("");
In this method the redirection to the page is done in server, so the
redirect page is sent to the browser
i.e Process goes like this
Server -> Server -> Client(browser)
Transfer transfer Page is loaded
the page page is sent
Note:-
So response.redirect("") does call to client and then to server for loading
, server.transfer("") does not call to client, but transfer in the server and load that page to the client
|
|
|
|
|
I have created session
Session.Add("Loginuser", Login1.UserName);
Session.Timeout = 20;
Response.Redirect("~/HomePage.aspx");
i have created
Global.asax
void Session_Start(object sender, EventArgs e)
{
// Code that runs when a new session is started
if (Session.IsNewSession)
{
Server.Transfer("~/LoginPage.aspx");
}
}
in the master page
protected void Page_Load(object sender, EventArgs e)
{
if ((Session["Loginuser"]) == null)
{
Response.Write("Session out ....");
Response.Redirect("~/LoginPage.aspx");
session is not timed out and is not redirected to loginpage.
<session
...
...
>
how to achive it?
gives error
thank you
}
vijaya
|
|
|
|
|
hi
Please help..
There will be 10 TextBoxes in my WebPage. i need to ensure that atleast one textbox got filled by the user, before he clicks the submit button. To ensure this, i need to use Scripts in my ASP.Net 2005 application
Thanks in advance
Saravanan
|
|
|
|
|
I do not understand why u need javascript for this. U can simply use the condition on buttom click event
If u need javascript anyway use getelEmentById function of javascript.
I hope this will help you
|
|
|
|
|
Hi,
When we open a Word document as a link in a secure (https://) area of our website, we get a "Choose a digital certificate" window which pops up when i try to open the Word document. The message says "The Website you want to view requests identification. Please choose a certificate." However, there are no certificates listed in the window below the message. The certificate is not expired. I only get the error on Word documents (not PDF or Excel documents) and it only happens the first time you click on a link. If I reopen a Word document which just gave me an error, I will not receive the error the second time around. Our browser security is set to Medium and I did add our secure website to the Trusted Sites. Pls sort out this issue.
Regards
Vijay.
|
|
|
|
|
Hi,
I have implemented file uploading using Html Input control by means of client call back.It is working fine when tested loaclly.But in server it's not working.As i have done using client call back, i can not able to access the Input control in the code behind.So i couldn't able to access the
"SaveAs(string path)" method which will take care of saving the file to the webserver at the path specified in the argument of "Save()".
In my application i have written my own way of saving files to the webserver
at the path specified.Here is my code...
public string Attach(string p_path)
{
Boolean fileOK = false;
String path = Server.MapPath("~/Temp/");
FileInfo l_file = new FileInfo(p_path);
if (l_file.Exists)
{
String fileExtension = l_file.Extension.ToLower();
String[] allowedExtensions = { ".gif", ".png", ".jpeg", ".jpg", ".doc", ".txt", ".mp3", ".rm", ".wav" ,".pdf" ,".xls" };
for (int i = 0; i < allowedExtensions.Length; i++)
{
if (fileExtension == allowedExtensions[i])
{
fileOK = true;
}
}
}
if (fileOK)
{
try
{
l_file.CopyTo(path + l_file.Name);
string labelText = "File uploaded!";
return "J" + labelText + "^" + l_file.Name + "^" + p_path;
}
catch (Exception ex)
{
string labelText = "File could not be uploaded.";
return "Z" + labelText;
}
}
else
{
string labelText = "Cannot accept files of this type.";
return "Z" + labelText;
}
}
In the above code
p_path is the path of the file at the client side that is attached to the server.
Temp is the folder that we created in our application to which files are to be saved.
if (l_file.Exists)
{
}
l_file.Exists is returning false and "Cannot accept files of this type." is the message that i am getting.
|
|
|
|
|