|
Please read the forum guidelines. You have started several threads in which the message title has absolutely no meaning. Also, asking for the code is considered rude. You are expected to at least try programming and if you get stuck we will help.
|
|
|
|
|
hii
i have change my url name according to my requirment using global file concept
this is my function
void Application_BeginRequest(Object sender, EventArgs e)
{
String strCurrentPath;
String strCustomPath;
String StrReferrer;
if (Request.UrlReferrer != null)
StrReferrer = Request.UrlReferrer.PathAndQuery.ToString();
else
StrReferrer = "";
// for SubCategory
strCurrentPath = Request.Path;
strCurrentPath = strCurrentPath.ToLower().Replace("/RedTag/Client/".ToLower(), "");
if (strCurrentPath.StartsWith("subcategory.aspx"))
{
strCurrentPath = StrReferrer;
strCurrentPath = strCurrentPath.ToLower().Replace("/RedTag/Client/".ToLower(), "");
}
if (strCurrentPath.StartsWith("c-"))
{
string id = strCurrentPath.Split('-')[1].ToString();
strCustomPath = "category.aspx?catid=" + id.ToString();
Context.RewritePath(strCustomPath);
}
if (strCurrentPath.StartsWith("m-"))
{
string id = strCurrentPath.Split('-')[1].ToString();
strCustomPath = "subcategory.aspx?MFRID=" + id.ToString();
Context.RewritePath(strCustomPath);
}
if (strCurrentPath.StartsWith("s-"))
{
string id = strCurrentPath.Split('-')[1].ToString();
strCustomPath = "SubCategory.aspx?catid=" + id.ToString();
HttpContext.Current.RewritePath(strCustomPath);
// Context.RewritePath(strCustomPath);
}
if (strCurrentPath.StartsWith("p-"))
{
string id = strCurrentPath.Split('-')[1].ToString();
strCustomPath = "ItemPage.aspx?ProductID=" + id.ToString();
Context.RewritePath(strCustomPath);
}
}
now problem is that first time when my subcategory page load that time the url is like Client/s-1001-Data.aspx but when i do paging then my page is ispostback and my url change to SubCategory.aspx?catid=1001 means which is in
my Context.RewritePath ..i want the same url name should maintain through out the page...
Jintal Patel
|
|
|
|
|
hello sir
in my project i have one button view in excel.
In my project I have farpont spreadsheet when i click on view in excel button that time whatever we saw on farpoint spreadsheet that all save/view in excel spreadsheet.
guide me.
gayatri
Gayatri
|
|
|
|
|
Hi Gayatri,
Plz explain your query in details along with your code..and your problem.
Happy Coding,
AS@13
A key to every Solution
|
|
|
|
|
hello
my project is related to shares.
so i used farpoint spreasheet control in asp.net 2.0
which is look like excel spreadsheet.
when i click on button that time all data (which is available on screen)
will save in excel spreadsheet.
Gayatri
|
|
|
|
|
What is the datasource for ur spreadsheet control???
U can create an excel with ur datasource directly.....
|
|
|
|
|
hello
i am using sql datasource.
gayatri
Gayatri
|
|
|
|
|
hi
i am using asp.net 2.0
my project is shares related.
and i am using ado.net and sql database.
then how to export my application to excel.
Gayatri
|
|
|
|
|
u can use com object and prepare excel directly from database. Get data from database in a dataset, create and excelapp, workbook,worksheet etc and then just loop through the dataset assign the values to each cell.
|
|
|
|
|
|
hello
i write code but when i clicked on button that time one dialogbox coming which ask
"do you want to open or save file?"
file name - frmAnalystass.xls
when i click open
that time one message coming "you can't read it"
OR
when click save button that time file is saved.
when i open that saved file that time excel open but one message comming "you can't read it".
so please help me.
my code-====
protected void btnSaveToExcel_Click(object sender, EventArgs e)
{
objVarInit.sqlDS.Reset();
objVarInit.sqlDT.Reset();
objClsDllSql.sqlCon = objReadIniFile.funReadIniSql();
objClsDllSql.sqlCon.Open();
objVarInit.sqlDA = new SqlDataAdapter("select * from tUser", objClsDllSql.sqlCon);
objVarInit.sqlDT = new DataTable();
objVarInit.sqlDA.Fill(objVarInit.sqlDT);
objClsDllSql.sqlCon.Close();
Response.Clear();
Response.ContentType = "application/vnd.ms-excel";
string sep = "";
foreach (DataColumn dc in objVarInit.sqlDT.Columns)
{
Response.Write(sep + dc.ColumnName);
sep = "\t";
}
Response.Write("\n");
int i;
foreach (DataRow dr in objVarInit.sqlDT.Rows)
{
sep = "";
for (i = 0; i < objVarInit.sqlDT.Columns.Count; i++)
{
Response.Write(sep + dr[i].ToString());
sep = "\t";
}
Response.Write("\n");
}
}
gayatri
Gayatri
|
|
|
|
|
I am developing web sites using Visual Studio 2005 and typed dataset to access the database (SQL 2005 and Access 2003). Because the typed dataset generate parameterized queries, is that enough to be safe from SQL injection ?
|
|
|
|
|
ccess database i create a query but it give syntax error
|
|
|
|
|
Rewrite the query with proper syntax.....
It was a query or information for forum ....
|
|
|
|
|
Hi Folks,
I would like to more about the Satellite assembly.
Can anyone tell me more about satellite assembly?
How we can say an assembly as satellite assembly?
I'm using resource file,then can i say it as satellite assembly?
Thanks and Regards
Ganesan.S
|
|
|
|
|
Have you tried checking the same on google. There you will so much information.
Apurva Kaushal
|
|
|
|
|
Googling Google[^]
- Regards - JON Life is not measured by the amount of breaths we take, but by the moments that take our breath away.
|
|
|
|
|
Hai all,
i had one gridview filled with records from the database.
after that i want to insert or update records into the gridview.
if i click on addnew button,then it will send to another page,
there i have four textbox's of four colmns,and one button....
in this page if i click on the button,after entering into the four textbox's
then the records should be saved into the gridview of first page.
thanks in advance
Thanks
Subbu.
|
|
|
|
|
Then where are you getting the problem? Once you saved the data (inserrt) into the database and bind the gridview in the first page it will work OK.
Apurva Kaushal
|
|
|
|
|
Hi, I am working on outlook and ASP.NET integration. I am using the following class method to create a folder in the outlook 20003 contacts folder.
public class Folder<br />
{<br />
public static void CreateFolder(String folderName)<br />
{<br />
Outlook.Application oApp = new Microsoft.Office.Interop.Outlook.Application();<br />
<br />
Outlook.MAPIFolder oNs = (Outlook.MAPIFolder)oApp.GetNamespace("MAPI").GetDefaultFolder(Microsoft.Office.Interop.Outlook.OlDefaultFolders.olFolderContacts);<br />
oNs.Session.Folders.Add(folderName, Outlook.OlDefaultFolders.olFolderContacts);<br />
} <br />
<br />
}
From asp.net page I am passing the folder name. But it is throwing following exception.
The operation failed.
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.
Exception Details: System.Runtime.InteropServices.COMException: The operation failed.
Source Error:
Line 19:
Line 20: Outlook.MAPIFolder oNs = (Outlook.MAPIFolder)oApp.GetNamespace("MAPI").GetDefaultFolder(Microsoft.Office.Interop.Outlook.OlDefaultFolders.olFolderContacts);
Line 21: oNs.Session.Folders.Add(folderName, Outlook.OlDefaultFolders.olFolderContacts);
Line 22: }
Line 23:
Please help me.
Intelligence is measured by common sense not by how many scholarly books you read.
|
|
|
|
|
hi,
in my project i want to get the system time. for that i'm using the system.now.tostring() to get the time. but its showing the server time. how we get the client system time.
please help me....
|
|
|
|
|
Easiest way would be to use javascript to get that and then pass it back to the server through a hidden input. Another option is give the user a js cookie, then pick that cookie up the next time code executes on the server.
|
|
|
|
|
You can have a look at this[^] article to know how to get the systems time of the clients machine.
Apurva Kaushal
|
|
|
|
|
|
I have created a usercontrol which has some images,Login button and logout button.This control i am using in all the pages.In one of the page there are some textboxes,OK button below it and the same usercontrol at top of the page.
when i press enter in textbox control,focus goes to Login button of a usercontrol and calls its event automatically without pressing it.This happens in every page where textbox is there.When i press enter key i want the focus to go in OK button instead to usercontrols login button.
coolsatty
|
|
|
|