|
Please help any VB 2008 / asp.net 3.5 guru
I used dropdown list box SQL Server , list view, Pager … its working fine see the link below
http://www.tharjuma.com/anquran.aspx
The problem I’m facing is See the program …. For Example
If the I am selecting the Sura No 6. And press SHOW button , It will jump to the page No : 177 as the Database and program as I did
The same way if I choose Sura No 18. And press SHOW button , It will jump to the page No : 408 as the Database and program as I did .
But if I pressed Next/Last button in the pager its working ….but after that if select and Drop down list as mentioned on the same way it will not show right page. It requires the “First“ PAGE button of PAGER button to be pressed once then only it will be shown properly
How to rectify this? I think we need to reset the Pager every time when we click the Dropdown list? Could anyone guide me?
|
|
|
|
|
hi...i am beginner to asp.net with c#
i uploaded the file to physica path..but i want to upload the file to server..please help me how can i give the server path....
the following code for the physical path..it is working fine...
File1.PostedFile.SaveAs(Server.MapPath(".\\" + StrFileName));
thank you....
|
|
|
|
|
qn123 wrote: i uploaded the file to physica path..but i want to upload the file to server..please help me how can i give the server path....
Here is one way...
create a Serverimage folder in your web application
Public string GetServerImagePath()<br />
{<br />
return System.Web.HttpContext.Current.Request.PhysicalApplicationPath + "Serverimage\\";<br />
}
qn123 wrote: the following code for the physical path..it is working fine...
File1.PostedFile.SaveAs(Server.MapPath(".\\" + StrFileName));
and while upload
fUpload.PostedFile.SaveAs(GetServerImagePath()+ "StrFileName");
Note : You have to give write permission to every one on that image folder
cheers,
Abhijit
CodeProject MVP
|
|
|
|
|
hi..
i m creating the binary tree where i have a html 2 row and 3 column in table.1 st row middle column contain image.it is root to create left or right node i need to create same html table in 2nd row corner column.every tyme i need to call the html table with in another table.how can i able to do that using asp.net coding.
plz help
|
|
|
|
|
hello.
when I am running GalleryServerPro, I see an error in the administrator page.error is following:
Insufficient permission
You are are not authorized to view any albums. Contact your administrator to request access.
this error no permit I do a effective.
|
|
|
|
|
|
dear friends,
I have a gridview and it is within a updatepannel.I want to impliment custom pagging for this gridview and there are certain conditions for custom pagging as per my application requirement and these are as follows:
1. I run a SP and get the data and storeed in a dataset.say 100000 records i got and store in the dataset.
2. Now when I select the pageID from a dropdownlist it should not hit the database again inspite of this it should took out only 10 records at a time from the dataset which was already filled and stored in the dataset when the page is loaded firsttime.
Here I am facing 2 major problems
1. since i am using updatepannel pagging is very slow and i cann't remove the updatepannel in this moment due to application requirement.
2. Cannot findout the proper code in this sinarion for handle custom pagging in codebehind using dataset,dataview or datatable.Because I cannot use a SP for pagging due to application requirement so only I hv to handle it in codebehind.
********************* Please help this is urgent!!! *********************
Thanks & Regards
Bikash
|
|
|
|
|
Hi Bikash,
You have to look on Sys.WebForms.PageRequestManager class. Check the MSDN Ref^[^]
Even, I went through the similar problem for maintaining the Grid Scroll Position inside the update Panel. I have written one article on this, Hope this will help you, MMaintain GridView Scroll Position and Header Inside Update Panel[^]
Let me know any other issue.
cheers,
Abhijit
CodeProject MVP
|
|
|
|
|
hi abhijit,
Thanks for ur response, I will check it soon.
regards
bikash
|
|
|
|
|
Hi,
I am using MasterPage and contentpage in my project. I have declared the form element in the masterpage and inside the form i have placed the contentplaceholder. Now i have a button in the content page which uses server.transfer method to transfer control to another file along with data. But i need to do open the page in a new window. Is there any option to do it so. If we assign form's target to blank will it open in a new window. If so how to assign target value of the form element in a content page button click.
modified on Saturday, March 14, 2009 2:24 AM
|
|
|
|
|
Aspx page return the following error
(Valid values are between 1 and 9666, inclusive.Parameter name: year )
when I am trying to Add calander from the tool box.
I am using the following culure in page tage:
UICulture="ar-sa" Culture="ar-SA>
I tried to use the following code in the load page:
System.Globalization.CultureInfo ci = new System.Globalization.CultureInfo("ar-SA");
System.Threading.Thread.CurrentThread.CurrentUICulture = ci; System.Threading.Thread.CurrentThread.CurrentCulture = ci;
but the same error returned
I adjust the Calander setting from control Panel to Higri calander and then
to grogrian calander but also the same error returne.
thanks in Advance
Mohammed Ibrahim
|
|
|
|
|
Hi
i had the same problem and i dont know what to do ?
here my code
if (txtStartDate.Text != String.Empty)
{
try
{
DateTime dm = new DateTime();
dm = Convert.ToDateTime(txtStartDate.Text);
string date = dm.ToString("yyyy-MM-dd", new System.Globalization.CultureInfo("en-US"));
ConditionStatement += " convert(datetime, reg_date,131) >= convert(datetime, '" + date + "') AND ";//dd/mm/yyyy
Label5.Visible = false;
}
catch
{
Label5.Text = "Enter the date correctly";
Label5.Visible=true;
}
}
if hve any soluotion pleas reply me
thanks advance
|
|
|
|
|
try this:
DateTime tempDate = DateTime.ParseExact(str_grogtian_date, allFormats, enCul.DateTimeFormat, DateTimeStyles.AllowWhiteSpaces);
return tempDate.ToString("yyyy/MM/dd", arCul.DateTimeFormat);
Mohammed Ibrahim
|
|
|
|
|
Error when clicking a link ,
before applying session id on login page there was no link error .
how can i remove this link error , can someone please help me...,
here is the code
protected void Page_Load(object sender, EventArgs e)
{
string m;
m = Request.QueryString["a"].ToString();
TextBox1.Text = m;
if (!IsPostBack)
show();
}
private void show()
{
adp = new SqlDataAdapter("select date ,title ,url ,description, author, city,country from postupdation", con);
adp .Fill (ds);
GridView1.DataSource = ds;
GridView1.DataBind();
// GridView2.Visible = true;
}
protected void Button1_Click(object sender, EventArgs e)
{
Response.Write("<script language=javascript>var wnd=window.open('','newWin','height=1,width=1,left=900,top=700,status=no,toolbar=no,menubar=no,scrollbars=no,maximize=false,resizable=1');</script>");
Response.Write("<script language=javascript>wnd.close();</script>");
Response.Write("<script language=javascript>window.open('Login.aspx','_parent',replace=true);</script>");
Session.Abandon();
}
protected void Button7_Click(object sender, EventArgs e)
{
adp = new SqlDataAdapter("select country,date,title,url, description, author, city from postupdation where languages='"+DropDownList1.SelectedItem.Text+"'", con);
adp.Fill(ds);
GridView1.DataSource = ds;
GridView1.DataBind();
}
protected void Button2_Click(object sender, EventArgs e)
{
adp = new SqlDataAdapter("select country,date,url,title, description, author, city from postupdation where categories='" + DropDownList2.SelectedItem.Text + "'", con);
adp.Fill(ds);
GridView1.DataSource = ds;
GridView1.DataBind();
}
protected void LinkButton7_Click(object sender, EventArgs e)
{
Response.Redirect("postupdation.aspx?a=" + TextBox1 .Text );
}
protected void LinkButton6_Click(object sender, EventArgs e)
{
Response.Redirect("postupdation.aspx?a=" + TextBox1.Text);
}
protected void LinkButton6_Click1(object sender, EventArgs e)
{
Response.Redirect("usersforum.aspx?a=" + TextBox1.Text);
}
protected void LinkButton1_Click(object sender, EventArgs e)
{
Response.Redirect("member.aspx?a=" + TextBox1.Text);
}
protected void LinkButton2_Click(object sender, EventArgs e)
{
}
protected void LinkButton8_Click(object sender, EventArgs e)
{
Response.Redirect("commentbox.aspx?a=" + TextBox1.Text);
}
protected void LinkButton3_Click(object sender, EventArgs e)
{
}
....
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body text="#e00000" bgcolor="#ccccff">
<form id="form1" runat="server">
<div>
<asp:LinkButton ID="LinkButton1" runat="server" Style="z-index: 100; left: 203px;
position: absolute; top: 237px" Width="74px" Font-Size="13pt" BorderStyle="None" BorderWidth="15px" Font-Bold="True" Font-Italic="False" ForeColor="Yellow" Height="20px" BorderColor="DarkRed" Font-Names="Courier New" PostBackUrl="~/member.aspx" Font-Underline="False" OnClick="LinkButton1_Click">Members</asp:LinkButton>
<asp:LinkButton ID="LinkButton2" runat="server" Style="z-index: 101; left: 285px;
position: absolute; top: 238px" Font-Size="13pt" BorderStyle="None" BorderWidth="15px" Font-Bold="True" Font-Italic="False" ForeColor="Yellow" Height="22px" Width="78px" BorderColor="DarkRed" Font-Names="Courier New" Font-Underline="False" OnClick="LinkButton2_Click" PostBackUrl="~/blogs.aspx">Blogs</asp:LinkButton>
<asp:LinkButton ID="LinkButton3" runat="server"
Style="z-index: 102; left: 81px; position: absolute; top: 236px" Font-Size="13pt" Height="20px" Width="118px" BorderStyle="None" BorderWidth="15px" Font-Bold="True" Font-Italic="False" ForeColor="Yellow" BorderColor="DarkRed" Font-Names="Courier New" Font-Underline="False" PostBackUrl="~/displayprofile.aspx" OnClick="LinkButton3_Click">My profile</asp:LinkButton>
<asp:LinkButton ID="LinkButton4" runat="server" PostBackUrl="~/Homepage.aspx" Style="z-index: 103;
left: 20px; position: absolute; top: 236px" Font-Size="13pt" BorderStyle="None" BorderWidth="15px" Font-Italic="False" ForeColor="Yellow" Height="15px" Width="55px" BorderColor="DarkRed" Font-Bold="True" Font-Names="Courier New" Font-Underline="False">Home</asp:LinkButton>
&nbsp; &nbsp;&nbsp;
<asp:Label ID="Label1" runat="server" Font-Size="25pt" Style="z-index: 104; left: 382px;
position: absolute; top: 337px" Text=" Recently Updated" Width="392px" Font-Bold="True" Font-Names="Andalus" Font-Italic="False" Font-Underline="False"></asp:Label>
&nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;
<asp:LinkButton ID="LinkButton7" runat="server" Font-Bold="True" Font-Size="13pt"
PostBackUrl="~/postupdation.aspx" Style="z-index: 105; left: 501px; position: absolute;
top: 240px" BorderStyle="None" BorderWidth="15px" Font-Italic="False" ForeColor="Yellow" Height="20px" Width="65px" BorderColor="DarkRed" Font-Names="Courier New" Font-Underline="False" OnClick="LinkButton7_Click">SUBMIT</asp:LinkButton>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
<asp:Label ID="Label4" runat="server" ForeColor="#C00000" Style="z-index: 106; left: 10px;
position: absolute; top: 311px" Text="Search by"></asp:Label>
<asp:DropDownList ID="DropDownList1" runat="server" Height="43px" Style="z-index: 107;
left: 77px; position: absolute; top: 311px" Width="132px" BackColor="#CCCCFF">
<asp:ListItem>Languages</asp:ListItem>
<asp:ListItem>English</asp:ListItem>
<asp:ListItem>Malayalam</asp:ListItem>
<asp:ListItem>Tamil</asp:ListItem>
<asp:ListItem>Telugu</asp:ListItem>
<asp:ListItem>Kannada</asp:ListItem>
</asp:DropDownList>
<asp:Button ID="Button7" runat="server" Style="z-index: 108; left: 218px; position: absolute;
top: 311px" Text="Go" OnClick="Button7_Click" />
&nbsp; &nbsp;&nbsp; &nbsp; &nbsp;
<asp:LinkButton ID="LinkButton5" runat="server" Font-Bold="True" Font-Size="13pt"
ForeColor="Yellow" PostBackUrl="~/Search.aspx" Style="z-index: 109; left: 930px;
position: absolute; top: 236px">Search</asp:LinkButton>
&nbsp; &nbsp;
<asp:LinkButton ID="LinkButton8" runat="server" Font-Bold="True" ForeColor="Yellow"
Height="21px" Style="z-index: 110; left: 372px; position: absolute; top: 239px" Font-Names="Courier New" Font-Size="13pt" Width="112px" PostBackUrl="~/Commentbox.aspx" OnClick="LinkButton8_Click">Comment Box</asp:LinkButton>
&nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;
<asp:Button ID="Button1" runat="server" BackColor="#CCCCFF" Font-Size="12pt"
ForeColor="Maroon" OnClick="Button1_Click" Style="z-index: 111; left: 895px;
position: absolute; top: 24px" Text="Logout" BorderColor="White" />
&nbsp;
<asp:LinkButton ID="LinkButton6" runat="server" Font-Bold="True" Font-Names="Courier New"
Font-Size="12pt" ForeColor="Yellow" PostBackUrl="~/usersforum.aspx" Style="z-index: 112;
left: 579px; position: absolute; top: 240px" Width="181px" OnClick="LinkButton6_Click1">Discussion forum</asp:LinkButton>
<asp:LinkButton ID="LinkButton9" runat="server" Font-Bold="True" Font-Size="12pt"
ForeColor="Yellow" Style="z-index: 113; left: 777px; position: absolute; top: 239px"
Width="50px">Help</asp:LinkButton>
&nbsp; &nbsp;
<asp:DropDownList ID="DropDownList2" runat="server" BackColor="#C0C0FF" Style="z-index: 114;
left: 803px; position: absolute; top: 306px" Width="126px">
<asp:ListItem>Categories</asp:ListItem>
<asp:ListItem>stories</asp:ListItem>
<asp:ListItem>poems</asp:ListItem>
<asp:ListItem>History</asp:ListItem>
<asp:ListItem>relegions</asp:ListItem>
<asp:ListItem>films</asp:ListItem>
<asp:ListItem>others</asp:ListItem>
<asp:ListItem>photos</asp:ListItem>
<asp:ListItem>arts</asp:ListItem>
<asp:ListItem>education</asp:ListItem>
<asp:ListItem>news</asp:ListItem>
</asp:DropDownList>
<asp:Label ID="Label2" runat="server" Style="z-index: 115; left: 735px; position: absolute;
top: 306px" Text="Search by " ForeColor="#C00000"></asp:Label>
<asp:Button ID="Button2" runat="server" OnClick="Button2_Click" Style="z-index: 116;
left: 937px; position: absolute; top: 307px" Text="Go" />
<asp:TextBox ID="TextBox1" runat="server" BackColor="#CCCCFF" BorderStyle="None"
Font-Bold="True" Font-Size="14pt" ForeColor="Maroon" Style="z-index: 117; left: 56px;
position: absolute; top: 87px"></asp:TextBox>
&nbsp;
</div>
<asp:Label ID="Label3" runat="server" Font-Size="14pt" ForeColor="Maroon" Style="z-index: 118;
left: 23px; position: absolute; top: 93px" Text="Hii,"></asp:Label>
&nbsp; &nbsp;&nbsp;
<img src="Picturs/a10001.jpg" style="z-index: 99; left: -13px; width: 1008px; position: absolute;
top: 155px; height: 141px" />
<asp:Label ID="Label5" runat="server" Font-Bold="True" Font-Italic="False" Font-Names="Simplified Arabic Fixed"
ForeColor="Purple" Style="z-index: 119; left: 432px; position: absolute; top: 108px"
Text=" Blogagregatore" Font-Size="13pt"></asp:Label>
&nbsp;
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" Style="z-index: 120;
left: 59px; position: absolute; top: 457px" CellPadding="4" ForeColor="#333333" GridLines="None" Height="170px" Width="890px" AllowSorting="True" BorderWidth="2px" CellSpacing="5">
<Columns>
<asp:BoundField DataField="date" HeaderText="Date" InsertVisible="False" />
<asp:BoundField DataField="description" HeaderText="Description" />
<asp:HyperLinkField DataNavigateUrlFields="url" DataTextField="title" HeaderText="Click here to read more"
NavigateUrl="url" Target="_parent" />
<asp:BoundField DataField="country" HeaderText="Country" />
<asp:BoundField DataField="city" HeaderText="City" />
<asp:BoundField DataField="author" HeaderText="Author" />
</Columns>
<FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
<RowStyle BackColor="#CCCCFF" ForeColor="#333333" />
<SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="Navy" />
<PagerStyle BackColor="#FFCC66" ForeColor="#333333" HorizontalAlign="Center" />
<HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
<AlternatingRowStyle BackColor="White" />
</asp:GridView>
</form>
</body>
</html>
|
|
|
|
|
You have putted a lot of code and which is not understandable at all. Please put those line of code which you think that can cause the problem. and please post properly.
cheers,
Abhijit
CodeProject MVP
|
|
|
|
|
actually i want to create a search engine for my website which will search all the data within site static as well as dynamic.
I am facing a problem when i want to search dynamic data which is generated by querystring.
I have used webClent's downloaddata method to access data from particular page, but it only searchs the entire folder of my website.
It searches dynamic data but in result page it shows wrong link.Is there any way to access all the links or anchor tag from a page having querystring and passes to webclient for accessing the data and show in result page..I hope that everyone can understand my problem and requirement..
Regards
Umesh
Umesh
|
|
|
|
|
If your content is dynamically generated, then you need to search the content it is generated by. If it's static, then you probably still want to put it in a DB, that's waht databases are good at. It sounds to me like your issue is taking the content you find, and correctly linking to the page that was found. I am not sure why this is, but it indicates an issue in your data structure.
the cheats way, nowadays, is to use google to search your site.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
What I am working on is creating a custom Asp config file to update the site configuration without using the web.config file. I was planning to use my site's existing cacheManager to hold new configuration changes and have a dependency setup on the path to the file, or file itself. The objectives of this are as follows:
1. Not have the site automatically restart to read new changes made like the default web.config file does.
2. Create a cache dependency so that once the custom config file has been changed, or touched, it's will automatically invalidate the cache and on next config item read use the new config properties for all logged in and new users.
Now, I do not know if there is something already built into the .NET framework that I can use or if this is something I must implement myself.
If anyone can provide me with useful links or ideas that would be great!
Thanks,
Steve
|
|
|
|
|
I am not aware of anything built-in. You have to create your own custom files and classes to read it.
|
|
|
|
|
Hello All,
I have a question that I think I did perform due diligence on finding an answer before having to interupt your day. I am at a lost, so here goes.
I have an internal application that users requested I extend it's features by allowing a user to upload a file that anyone can look at by selecting it from a list.
I utilized the FileUpload Control with extreme ease and that this part is working great (uploading the files and saving them to the hard drive.) After this I have hit a wall.
I want the user to be able to select a saved file and have it displayed in the aspx page with the correct external application (Word for docs and txt files, and anything for pdf files. I allow the upload of DOC and PDF files). I have not found a way to do this.
If anyone can point me in the right direction, I will greatly appreciate it.
Again, sorry to bug you guys but I am lost.
|
|
|
|
|
If you do a response.write and set the header type correctly, then they will be able to view those files, provided they have acrobat and word installed.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
|
I dont see any point in implementing such thing. because if you have atleast one samrt user then...
User can alway take a screen shot and save it.
User can use 3rd party browser which are not following that policy.
User can save the page by writing some script, without opening it in web browser.
User can copy-paste text and take a screen shot of your images.
User can print out and make a same page, by writting a same text or creating a same images.
User can copy the contents from "Temp Internet Files" folder.
So I think if your information is that much sensitive then just dont display it. otherwise you cannot prevent users to copy something.
|
|
|
|
|
hemant.kaushal wrote: Got an article related to it but not getting any way to do that
http://msdn.microsoft.com/en-us/library/ms814886.aspx[^]
This article should be applying towards Internet Explorer Administration Kit.
hemant.kaushal wrote: Is there any way to disable Save As.. Menu option on web page ?
I would say if you do that, it would end up looking rude at the user.
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
The woods are lovely, dark and deep,
But I have promises to keep,
And miles to go before I sleep,
And miles to go before I sleep!
|
|
|
|
|
My requirement is to track pages in a ASP.NET Website.
The user should not be allowed to type some URL and go to pages of sites without logging in..
How to do that in ASP.NET
|
|
|
|
|