|
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.
|
|
|
|
|
hi,
i have a login page in that user name and password remember on this computer option i kept in that page, if the user click the remember me in this computer means the user name and passsword are save in that system cookies,i want to Encrypt the user name and password, then only i will not identified by others, i designed the page in asp.net with vb.net.
so, plz help me
jai prakash
|
|
|
|
|
take a look [herewww.behzadi.net
|
|
|
|
|
Hi,
I want to know wat is the limit on the total number of checkboxes created in a checkedBoxList. Is there any limit to the total number of checkboxes generated?If my dataset is returning 1000 values then will my checkedboxlist generate 1000 checkboxes?
Thanks,
Riz
|
|
|
|
|
Hi,
Yes it will generate 1000 checkboxes.
Thanks and Regards,
Chetan Ranpariya
|
|
|
|
|
Of course, No limit on no.of check boxes.
gh
|
|
|
|
|
Hi all,
i try to put one image in a table. right now the table is empty.i insert image through front end web form by selecting specified image on clicking browse button.after click the insert button then this error is raised. how can i solve this.
"System.IndexOutOfRangeException: There is no row at position 0 "
pls help me.
|
|
|
|
|
Could you please post your code too??
I believe, you are updating the 0th row of the DataSet without adding NewRow to it. As the table is empty, the 0th row does not exists. But this is my assumption.
Post your code, lets analyze it...
|
|
|
|
|
hi venkatesh,
you are right, u r assumption is correct. but i want to insert many rows from webform. but this code inserts only one row.if try to insert many rows overwrite and show latest insert record. how to solve this.
my code:
Dim da As New SqlDataAdapter("Select * From pub_info ", con)
Dim MyCB As SqlCommandBuilder = New SqlCommandBuilder(da)
Dim ds As New DataSet
da.MissingSchemaAction = MissingSchemaAction.AddWithKey
con.Open()
da.Fill(ds, "pub_info")
Dim fn As String = System.IO.Path.GetFullPath(File1.PostedFile.FileName)
Dim fs As New FileStream(fn, FileMode.OpenOrCreate, FileAccess.Read)
Dim MyData(fs.Length) As Byte
Dim sql As String
fs.Read(MyData, 0, fs.Length)
fs.Close()
ds.Tables("pub_info").Rows(0)("logo") = MyData
da.Update(ds, "pub_info")
pls help me.
|
|
|
|
|
Sophia Rekhi wrote: Dim da As New SqlDataAdapter("Select * From pub_info ", con)
Dim MyCB As SqlCommandBuilder = New SqlCommandBuilder(da)
Dim ds As New DataSet
da.MissingSchemaAction = MissingSchemaAction.AddWithKey
con.Open()
da.Fill(ds, "pub_info")
Dim fn As String = System.IO.Path.GetFullPath(File1.PostedFile.FileName)
Dim fs As New FileStream(fn, FileMode.OpenOrCreate, FileAccess.Read)
Dim MyData(fs.Length) As Byte
Dim sql As String
fs.Read(MyData, 0, fs.Length)
fs.Close()
ds.Tables("pub_info").Rows(0)("logo") = MyData
da.Update(ds, "pub_info")
Change as below,
Dim da As New SqlDataAdapter("Select * From pub_info ", con)
Dim MyCB As SqlCommandBuilder = New SqlCommandBuilder(da)
Dim ds As New DataSet
da.MissingSchemaAction = MissingSchemaAction.AddWithKey
con.Open()
da.Fill(ds, "pub_info")
Dim fn As String = System.IO.Path.GetFullPath(File1.PostedFile.FileName)
Dim fs As New FileStream(fn, FileMode.OpenOrCreate, FileAccess.Read)
Dim MyData(fs.Length) As Byte
Dim sql As String
fs.Read(MyData, 0, fs.Length)
fs.Close()
If ds.Tables("pub_info").Rows.Count=0 Then
Dim DR As DataRow = ds.Tables("pub_info").NewRow()
ds.Tables("pub_info").Rows.Add(DR)
End If
ds.Tables("pub_info").Rows(0)("logo") = MyData
da.Update(ds, "pub_info")
I think this would solve your problem.
|
|
|
|
|
Thanx venkatesh,
it is fine , while i click insert button.but no image is stored in to table.and after clicking the getimage button same error will raise.
but your solutions is very helpful to me.
thanks
|
|
|
|
|